-
Notifications
You must be signed in to change notification settings - Fork 25
87 lines (70 loc) · 2.01 KB
/
tests.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
on:
push:
branches:
- develop
pull_request:
branches:
- develop
name: Run tests
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
container: fedorapython/fedora-python-tox:latest
steps:
- uses: actions/checkout@v4
- name: Install pre-commit
run: dnf install -y pre-commit git
- name: Mark the working directory as safe for Git
run: git config --global --add safe.directory $PWD
- name: Run pre-commit checks
run: pre-commit run -v --all-files
licenses:
name: Licenses
runs-on: ubuntu-latest
container: fedorapython/fedora-python-tox:latest
steps:
- uses: actions/checkout@v4
- name: Install RPM dependencies
run: |
dnf install -y krb5-devel libpq-devel
- name: Check licenses for datanommer.${{ matrix.package }}
run: tox -e licenses
working-directory: datanommer.${{ matrix.package }}
strategy:
matrix:
package:
- models
- consumer
- commands
unit_tests:
name: Unit tests
runs-on: ubuntu-latest
container: fedorapython/fedora-python-tox:latest
steps:
- uses: actions/checkout@v4
- name: Install RPM dependencies
run: |
dnf install -y timescaledb postgresql-server krb5-devel libpq-devel
- name: Run unit tests for datanommer.${{ matrix.package }}
# Don't run the tests as root or pg_ctl will refuse to start
run: |
chown postgres:postgres .
sudo -u postgres tox -e ${{ matrix.pyver }} -- -vv
working-directory: datanommer.${{ matrix.package }}
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
# with:
# name: ${{ matrix.tox_env }}
# flags: unittests
# env_vars: PYTHON
# fail_ci_if_error: true
strategy:
matrix:
pyver:
- py310
- py311
package:
- models
- consumer
- commands