-
Notifications
You must be signed in to change notification settings - Fork 74
62 lines (59 loc) · 1.6 KB
/
tests.yaml
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
name: "Running tests: style, pytests and entry-points"
env:
GT4SD_CI: true
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches:
- "**"
- "!gh-pages"
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
shell: bash -l {0} # for conda command
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: gt4sd
environment-file: conda.yml
auto-activate-base: false
use-only-tar-bz2: true
- name: Install gt4sd from source
run: |
conda activate gt4sd
pip install --no-deps .
- name: Check black
run: |
conda activate gt4sd
python -m black src/gt4sd --check --diff --color
# - name: Check isort
# run: |
# conda activate gt4sd
# python -m isort src/gt4sd --check-only
- name: Check flake8
run: |
conda activate gt4sd
python -m flake8 --disable-noqa --per-file-ignores="__init__.py:F401" src/gt4sd
- name: Check mypy
run: |
conda activate gt4sd
python -m mypy src/gt4sd
- name: Run pytests
run: |
conda activate gt4sd
python -m pytest -sv
- name: Test entry-points
run: |
conda activate gt4sd
gt4sd-trainer --help
gt4sd-inference --help
gt4sd-saving --help
gt4sd-upload --help
gt4sd-pl-to-hf --help
gt4sd-hf-to-st --help