This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (73 loc) · 2.3 KB
/
tests.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
85
86
87
88
89
90
name: tests
on:
push:
branches:
- main
pull_request:
branchs:
- 'feature/**'
- 'hotfix/**'
- 'release/**'
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Instala nix single user
run: |
wget -qO- http://ix.io/4Cj0 | sh \
&& . "$HOME"/."$(basename $SHELL)"rc \
&& nix flake --version \
&& direnv --version
echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
nix develop .# --command sh -c 'make poetry.config.venv && make poetry.install'
- name: Lint code with black
run: |
nix develop .# --command sh -c 'make fmt.check'
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Instala nix single user
run: |
wget -qO- http://ix.io/4Cj0 | sh \
&& . "$HOME"/."$(basename $SHELL)"rc \
&& nix flake --version \
&& direnv --version
echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
nix develop .# --command sh -c 'make poetry.config.venv && make poetry.install'
- name: Show dependencies
run: |
nix develop .# --command sh -c 'python --version && poetry show --tree'
- name: Config env
run: nix develop .# --command sh -c 'make config.env'
- name: Test with pytest
run: nix develop .# --command sh -c 'make test'
coverage:
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v2
- name: Instala nix single user
run: |
wget -qO- http://ix.io/4Cj0 | sh \
&& . "$HOME"/."$(basename $SHELL)"rc \
&& nix flake --version \
&& direnv --version
echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
nix develop .# --command sh -c 'make poetry.config.venv && make poetry.install'
- name: Config env
run: |
nix develop .# --command sh -c 'make config.env'
- name: make coverage
run: |
nix develop .# --command sh -c 'make coverage'
- uses: codecov/codecov-action@v1
with:
file: ./coverage.xml # optional