This repository has been archived by the owner on Mar 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (70 loc) · 1.76 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
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
name: Tests
on:
push:
tags-ignore:
- '**'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
- '.github/**'
- '!.github/workflows/test.yml'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
- '.github/**'
- '!.github/workflows/test.yml'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
sudo apt update && sudo apt install --yes libgl1-mesa-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: Test with pytest
run: |
pytest --cov=inka --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: GitHub
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: mypy
run: |
mypy --python-version=3.10 src/
- name: flake8
run: |
flake8 src/ tests/
- name: black
run: |
black --check --verbose ./src ./tests
- name: isort
run: |
isort . --check --diff