-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (67 loc) · 1.74 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
71
name: CI
on:
pull_request:
push:
branches: [master, staging, dev]
jobs:
#----------------------------------------------
# Build Environment
#----------------------------------------------
build:
name: Build
uses: ./.github/workflows/build.yml
with:
name: Cache
command: |
poetry run python -m pip list
poetry run python --version
poetry --version
poetry run echo "Build successful"
#----------------------------------------------
# Run Linters
#----------------------------------------------
lint-black:
name: Linter
needs: build
uses: ./.github/workflows/build.yml
with:
name: Black
command: poetry run python -m black --check .
lint-isort:
name: Linter
needs: build
uses: ./.github/workflows/build.yml
with:
name: Isort
command: poetry run python -m isort --check-only .
lint-mypy:
name: Linter
needs: build
if: false # This condition ensures the job is never executed
uses: ./.github/workflows/build.yml
with:
name: Mypy
command: poetry run python -m mypy --verbose 0 .
lint-flake8:
name: Linter
needs: build
uses: ./.github/workflows/build.yml
with:
name: Flake8
command: poetry run python -m flake8 .
#----------------------------------------------
# Run Tests
#----------------------------------------------
test-unittest:
name: Tests
needs: [
lint-black,
lint-isort,
lint-mypy,
lint-flake8,
]
if: ${{ always() }} # will run the tests regardless of linting success
uses: ./.github/workflows/build.yml
with:
name: Unittests
command: poetry run pytest tests/