-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (43 loc) · 1.26 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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}