-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.37 KB
/
test.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
name: http-toolkit-test
on: [push]
env:
TEST_DEPENDENCIES: "tox~=4.15.1"
jobs:
check-project-files:
runs-on: ubuntu-latest
steps:
- name: variables
run: |
PROJECT_FILES=(README.md pyproject.toml tox.ini)
ERROR=0
- name: test
run: |
for file in ${PROJECT_FILES[*]}; do
if ! [ -f $file ]; then
echo "$file not found in project"
ERROR=1
fi
done
exit $ERROR
lint:
runs-on: ubuntu-latest
strategy:
matrix:
linters: [pyproject, flake8, mypy]
steps:
- uses: actions/checkout@v4
- name: python-build
uses: ./.github/actions/python-build
- name: install-dependencies
run: |
python3 -m pip install --upgrade pip
pip install $TEST_DEPENDENCIES
- name: test
run: tox -e "${{ matrix.linters }}"
test:
runs-on: ubuntu-latest
strategy:
matrix:
minor_versions: [8, 9, 10, 11, 12]
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.${{ matrix.minor_versions }}'
- name: install-dependencies
run: |
python3 -m pip install --upgrade pip
pip install $TEST_DEPENDENCIES
- name: test
run: tox -e "py3${{ matrix.minor_versions }}"