Proto Enum #592
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: DSG lint test workflow | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
env: | |
DB_NAME: postgres | |
DB_USER: postgres | |
DB_PASSWORD: postgres | |
DB_HOST: "127.0.0.1" | |
DB_PORT: "5432" | |
jobs: | |
Lint-Check-Test-back: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
django-version: ["4.2", "5.0"] | |
include: | |
- db: postgres | |
db_port: 5432 | |
services: | |
postgres: | |
image: postgres:15.3 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
# defaults: | |
# run: | |
# working-directory: ./ | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pip dependencies | |
if: steps.pip-cache.outputs.cache-hit != 'true' | |
run: | | |
pip install psycopg2 poetry | |
- name: Poetry install | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install | |
- name: Run pre-commit hooks | |
run: | | |
poetry run pre-commit run --all-files --show-diff-on-failure | |
- name: Run tests | |
run: | | |
poetry add django@^${{ matrix.django-version }} | |
poetry run tests |