resource reference, user reference #52
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: run_gravyvalet_tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
run_gravyvalet_tests: | |
strategy: | |
fail-fast: false | |
matrix: # use to test upgrades before upgrading | |
python-version: ['3.12'] | |
postgres-version: ['15'] | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: | | |
requirements/requirements.txt | |
requirements/dev-requirements.txt | |
- name: install py dependencies | |
run: pip install -r requirements/dev-requirements.txt | |
- name: set up pre-commit cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ matrix.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: run pre-commit checks | |
run: pre-commit run --all-files --show-diff-on-failure | |
- name: run tests | |
run: python3 manage.py test | |
env: | |
DEBUG: 1 | |
POSTGRES_HOST: localhost | |
POSTGRES_DB: gravyvalettest | |
POSTGRES_USER: postgres | |
SECRET_KEY: oh-so-secret |