Skip to content

Merge pull request #271 from alan-turing-institute/remove-pulumi-stack #478

Merge pull request #271 from alan-turing-institute/remove-pulumi-stack

Merge pull request #271 from alan-turing-institute/remove-pulumi-stack #478

Workflow file for this run

name: "Unit tests"
on:
push:
branches: [main, develop, test-actions]
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
env:
DT_SQL_TESTHOST: "localhost"
DT_SQL_TESTUSER: "postgres"
DT_SQL_TESTPASS: "postgres"
DT_SQL_TESTDBNAME: "test_db"
DT_SQL_TESTPORT: "5432"
DT_DEFAULT_USER_PASS: "password"
DT_JWT_SECRET_KEY: "this is a very random secret key"
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/checkout@v3
- uses: harmon758/postgresql-action@v1
with:
postgresql version: "11"
postgresql db: cropdb
postgresql user: postgres
postgresql password: postgres
- run: git submodule update --init --recursive
- run: pip install .[dev]
- run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
pytest --cov -vv
- name: Upload coverage reports to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}