-
Notifications
You must be signed in to change notification settings - Fork 46
96 lines (88 loc) · 2.56 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
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
88
89
90
91
92
93
94
95
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
linters:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Install packages
run: |
sudo snap install --no-wait ruff
sudo snap install --no-wait shellcheck
sudo snap install --no-wait woke
sudo snap install --no-wait --classic node
sudo snap install --no-wait --classic pyright
sudo apt update
sudo apt install -y libapt-pkg-dev aspell aspell-en
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install python packages and dependencies
run: |
pip install -U wheel -r requirements-jammy.txt -r requirements.txt -r requirements-dev.txt
pip install -e .
- name: Run black
run: |
make test-black
- name: Run codespell
run: |
make test-codespell
- name: Run mypy
run: |
make test-mypy
- name: Run pyright
run: |
sudo snap watch --last=install
make test-pyright
- name: Run ruff
run: |
sudo snap watch --last=install
make test-ruff
- name: Run sphinx-lint
run: |
make test-sphinx-lint
- name: Run shellcheck
run: |
sudo snap watch --last=install
make test-shellcheck
- name: Run linkcheck,woke,spelling
run: |
sudo snap watch --last=install
make test-docs
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
echo "::group::apt-get update"
sudo apt-get update
echo "::endgroup::"
echo "::group::apt-get install..."
sudo apt-get install -y python3 python3-dev python3-poetry libapt-pkg-dev libyaml-dev umoci
echo "::endgroup::"
echo "::group::pip install"
python -m pip install -U wheel setuptools pip
python -m pip install -U -r requirements.txt -r requirements-dev.txt -r requirements-jammy.txt
echo "::endgroup::"
- name: Install project
run: |
python -m pip install -e .
- name: Run unit tests
run: |
make test-units
- name: Run integration tests
run: |
make test-integrations