-
Notifications
You must be signed in to change notification settings - Fork 4
162 lines (143 loc) · 4.66 KB
/
tests-on-push.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
---
name: Tests on Push
on:
push:
branches-ignore:
- refs/heads/main
env:
DSP_TOOLS_TESTING: true
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: build docs
run: uv run mkdocs build --strict
- name: check external links in docs
run: |
npm install -g markdown-link-validator
just check-links
- name: markdownlint
run: just markdownlint
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: Linting with ruff
run: just ruff-check-github
- name: Check formatting with ruff
run: just ruff-format-check
- name: Linting with mypy
run: just mypy
- name: Linting with darglint
run: just darglint
- name: Check formatting of YAML files
# Homebrew is pre-installed but not added to PATH.
# See https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#homebrew-note
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install yamlfmt
yamlfmt -lint .
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: install dependencies
run: pip install yamllint
- name: yamllint
run: yamllint .
unittests:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: unittests
run: just unittests --cov=dsp_tools --cov-report xml
- name: upload coverage report to codecov.io
uses: codecov/codecov-action@v4
with:
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: integration-tests
run: just integration-tests --cov=dsp_tools --cov-report xml
- name: upload coverage report to codecov.io
uses: codecov/codecov-action@v4
with:
flags: integration-tests
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
benchmarking:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: benchmarking
run: uv run pytest -s test/benchmarking/
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: e2e-tests
run: just e2e-tests
e2e-validate-data-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: e2e-validate-data-tests
run: just e2e-validate-data-tests
legacy-e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install uv, just, and dependencies
uses: ./.github/actions/setup
- name: start stack
run: uv run dsp-tools start-stack --no-prune --with-test-data
- name: legacy e2e tests
run: just legacy-e2e-tests
- name: stop stack # see if this command can run (it isn't tested anywhere else)
run: uv run dsp-tools stop-stack
- name: make logging file available
uses: actions/upload-artifact@v4
if: always()
with:
name: logging.log
path: /home/runner/.dsp-tools/logging.log
compression-level: 0
distribution:
runs-on: ubuntu-latest
steps:
- name: Checkout dsp-tools repo
uses: actions/checkout@v4
- name: Install python, pytest, uv, build & install wheel
uses: ./.github/actions/setup-from-wheel
- name: distribution tests
run: python -m pytest --noconftest test/distribution/
# Reason for the --noconftest flag:
# test/conftest.py configures logging, but loguru should not be installed for the distribution tests