-
Notifications
You must be signed in to change notification settings - Fork 5
85 lines (68 loc) · 1.85 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
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: Mark the directory as safe for git
run: git config --global --add safe.directory $PWD
- name: Install RPM dependencies
run: |
dnf install -y krb5-devel
pip install "poetry>=1.2"
- name: Install the project
run: poetry install
- name: Run pre-commit checks
run: poetry run pre-commit run --all-files
docs:
name: Documentation
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
pip install "poetry>=1.2"
- name: Build the docs
run: tox -e docs
# - name: Save the docs
# uses: actions/upload-artifact@v2
# with:
# name: docs
# path: discourse2fedmsg/docs/_build/html
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 krb5-devel libpq-devel
pip install "poetry>=1.2"
- name: Run unit tests with Tox
run: tox -e ${{ matrix.tox_env }}-unittest
# - 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:
tox_env:
- py38
- py39
- py310
- py311