-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (46 loc) · 1.31 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
---
name: Lint and test workflow
on:
push:
branches: ['*', '!push-action/*']
pull_request:
branches: ['*', '!push-action/*']
jobs:
quality:
name: Lint code
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- name: Setup Python environment
uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.2.0
with:
python-version: '3.10'
- name: yamlfix
run: poetry run poe yamlfix-check
- name: isort
run: poetry run poe isort-check
- name: black
run: poetry run poe black-check
- name: ruff
run: poetry run poe ruff-check
- name: pyright
run: poetry run poe pyright
test:
runs-on: ubuntu-latest
needs: [quality]
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Setup Python environment
uses: khanlab/actions/.github/actions/action-setup_task-installPyProject@v0.2.0
with:
python-version: ${{ matrix.python-version }}
install-library: true
- name: Perform unit testing
run: poetry run poe test_cov
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ../cov.xml