Skip to content

[card-cache] optimizations to avoid deadlocks #1328

[card-cache] optimizations to avoid deadlocks

[card-cache] optimizations to avoid deadlocks #1328

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
codestyle:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python ${{ matrix.python-version }} dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pycodestyle
- name: Run Python PEP8 code style checks
run: pycodestyle
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python ${{ matrix.python-version }} dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox pylint
- name: Run Tox (pylint)
run: tox -e pylint
unit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python ${{ matrix.python-version }} dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run Tox
run: tox -e unit
integration:
runs-on: ubuntu-latest
services:
db_test: # This will be the hostname
image: postgres:11
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
options: >-
--health-cmd "pg_isready -d test -U test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
python-version: [3.11]
golang-version: ["^1.14.5"]
env:
MF_METADATA_DB_HOST: db_test
MF_METADATA_DB_PORT: 5432
MF_METADATA_DB_USER: test
MF_METADATA_DB_PSWD: test
MF_METADATA_DB_NAME: test
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: ${{ matrix.golang-version }}
- name: Install goose migration tool
run: go install github.com/pressly/goose/v3/cmd/goose@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python ${{ matrix.python-version }} dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Add required test DB alias name for localhost
run: echo "127.0.0.1 db_test" | sudo tee -a /etc/hosts
- name: Run Tox
run: tox -v -e integration