-
Notifications
You must be signed in to change notification settings - Fork 148
56 lines (52 loc) · 1.62 KB
/
pipeline.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
name: Linting and Tests
on:
push:
branches: ["main"]
pull_request:
jobs:
check-code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install tox
- run: tox -e check_codestyle
check-types-mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install tox
- run: tox -e check_types
run-unit-tests:
name: Unit tests
needs: [check-code-style, check-types-mypy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install -e .
- run: python -m twisted.trial tests
run-unit-tests-olddeps:
name: Unit tests (old dependencies)
needs: [ check-code-style, check-types-mypy ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Patch pyproject.toml to require oldest dependencies
run: |
# Ugly. Could use something like https://pyproject-parser.readthedocs.io/en/latest/cli.html#info in the future.
sed --in-place=.bak -e 's/>=/==/g' pyproject.toml
diff pyproject.toml.bak pyproject.toml || true # diff returns 1 if there is a change
- name: Install Sygnal
run: python -m pip install -e .
- run: python -m twisted.trial tests