-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (67 loc) · 1.73 KB
/
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
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
name: CI
on: [push]
jobs:
pylint:
runs-on: ubuntu-latest
name: Linting with Pylint
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: tensorli
- name: Lint with pylint
run: |
conda activate tensorli
pylint tensorli/*.py test/*.py
black:
runs-on: ubuntu-latest
name: Formatting with black
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: tensorli
- name: Format with black
run: |
conda activate tensorli
black tensorli/*.py test/*.py
tests:
runs-on: ubuntu-latest
name: Running tests with pytest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: tensorli
- name: Running tests with pytest
run: |
conda activate tensorli
pytest -v
mypy:
runs-on: ubuntu-latest
name: Running type checks with mypy
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
activate-environment: tensorli
- name: Running type checks with mypy
run: |
conda activate tensorli
mypy tensorli/ test/