Skip to content

[ENG-5143] Get citation information from Addons Service #1344

[ENG-5143] Get citation information from Addons Service

[ENG-5143] Get citation information from Addons Service #1344

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 }}
- name: install poetry
run: curl -sSL https://install.python-poetry.org | python - --version 1.8.3
- name: setup venv
run: python -m venv .venv
- name: set up venv cache
uses: actions/cache@v4
with:
path: .venv
key: ${{hashfiles('poetry.lock')}}
- name: install py dependencies
run: poetry install --without release
- name: set up pre-commit cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: poetry run pre-commit|${{ matrix.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: run pre-commit checks
run: poetry run pre-commit run --all-files --show-diff-on-failure
- name: run tests
run: poetry run python -Werror manage.py test
env:
DEBUG: 1
POSTGRES_HOST: localhost
POSTGRES_DB: gravyvalettest
POSTGRES_USER: postgres
SECRET_KEY: oh-so-secret