style: drop black
in favor of ruff format
#2280
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main, "release/*", "feature/*"] | |
jobs: | |
check-dependencies: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4.7.0 | |
with: | |
python-version-file: pyproject.toml | |
cache: "poetry" | |
cache-dependency-path: "poetry.lock" | |
- name: Check dependencies | |
run: | | |
make lock-main-requirements | |
make check-requirements | |
test: | |
strategy: | |
matrix: | |
type: | |
[ | |
lint, | |
check-db-migrations-needed, | |
test-coverage, | |
test-sudo-list, | |
] | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4.7.0 | |
with: | |
python-version-file: pyproject.toml | |
cache: "poetry" | |
cache-dependency-path: "poetry.lock" | |
- name: Install Python dependencies | |
run: poetry install | |
- name: Install additional tools | |
run: sudo apt-get install -y shellcheck | |
- name: Run Test | |
run: make ${{ matrix.type }} -k | |
env: | |
QPC_DBMS: postgres | |
QPC_DBMS_DATABASE: postgres | |
QPC_DBMS_PORT: 5432 | |
QPC_DBMS_USER: postgres | |
QPC_DBMS_PASSWORD: postgres | |
QPC_DBMS_HOST: localhost | |
- name: Report coverage | |
if: ${{ success() && contains(matrix.type, 'test-coverage') }} | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true # optional (default = false) | |
token: ${{ secrets.CODECOV_TOKEN }} # required | |
# verbose: true # optional (default = false) |