Skip to content

Tests update

Tests update #11

Workflow file for this run

name: tests
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }}
TEST_AUTH_PASSWORD: ${{ secrets.TEST_AUTH_PASSWORD }}
TEST_AUTH_USER: ${{ secrets.TEST_AUTH_USER }}
TEST_AUTH_USER_SUB: ${{ secrets.TEST_AUTH_USER_SUB }}
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
POSTGRES_DB: test_database
ports: [ '5432:5432' ]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set env variables
run: |
echo "DB_USER=$DB_USER" >> $GITHUB_ENV
echo "AUTH0_AUDIENCE=$AUTH0_AUDIENCE" >> $GITHUB_ENV
echo "AUTH0_AUTHORIZE_URL=$AUTH0_AUTHORIZE_URL" >> $GITHUB_ENV
echo "AUTH0_CONNECTION=$AUTH0_CONNECTION" >> $GITHUB_ENV
echo "AUTH0_ISSUER=$AUTH0_ISSUER" >> $GITHUB_ENV
echo "AUTH0_JWKS_URI=$AUTH0_JWKS_URI" >> $GITHUB_ENV
echo "AUTH0_REGISTER_URL=$AUTH0_REGISTER_URL" >> $GITHUB_ENV
echo "TEST_DB_URL=$TEST_DB_URL" >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[ci-tests]
- name: Test with pytest
run: |
pytest tests