-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 996 Bytes
/
Copy pathtest.yml
File metadata and controls
46 lines (36 loc) · 996 Bytes
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
name: CI
on:
push:
branches: [ master ]
paths:
- 'src/**'
- '../../tests/**'
- 'requirements.txt'
- '.github/workflows/**'
pull_request:
paths: [ '**' ]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt -r test/requirements.txt \
ruff black isort pyright mypy pytest-cov -q
- name: Run ruff
run: ruff check . --exit-non-zero-on-fix
- name: Run isort
run: isort . --check-only
- name: Run black
run: black . --check --diff
- name: Run pyright
run: pyright
- name: Run tests
run: pytest -v tests/