Skip to content

Repo consistency

Repo consistency #101

Workflow file for this run

name: Run tests
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
postgres_version: ['14','16']
services:
postgres:
image: postgres:${{ matrix.postgres_version }}
env:
POSTGRES_DB: rp_sidekick
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
redis:
image: redis:6.0
ports:
- 6379:6379
env:
RP_SIDEKICK_DATABASE: postgres://postgres:postgres@localhost/rp_sidekick
steps:
- uses: actions/checkout@v4
- name: Install gettext
run: sudo apt-get install gettext
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: abatilo/[email protected]
with:
poetry-version: "1.11.7"
- name: Install dependencies
id: install-deps
run: |
poetry install
- name: Check formatting
# Lints/tests should always run, even if other lints/tests have failed.
if: success() || failure() && steps.install-deps.outcome == 'success'
run: |
poetry run ruff format --check
- name: Lint
if: success() || failure() && steps.install-deps.outcome == 'success'
run: |
poetry run ruff check
- name: Run tests
if: success() || failure() && steps.install-deps.outcome == 'success'
run: |
poetry run pytest -vv