[ENG-6551] Reset credentials during oauth flow (#159) #1342
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 }} | |
- 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 |