-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (34 loc) · 1023 Bytes
/
ci.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
name: ci
on: [push, pull_request]
jobs:
test:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
set -xe
python -m pip install --upgrade pip
pip install flake8 pytest pytest-xdist yapf
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Lint with flake8
run: |
set -xe
flake8 . --config=setup.cfg --count --statistics
- name: Check formatting with yapf
run: |
set -xe
yapf . --style=setup.cfg --recursive --diff
- name: Test with pytest
run: |
set -xe
pytest -n "$(grep -c ^processor /proc/cpuinfo)" hj_reachability