@@ -16,99 +16,51 @@ jobs:
16
16
steps :
17
17
- uses : actions/checkout@v4
18
18
19
- - name : Instala nix single user
20
- run : |
21
- BASE_URL='https://raw.githubusercontent.com/ES-Nix/get-nix/' \
22
- && SHA256=87fa0f1dbfdd28a1f99b39d5bd4dcc39de97bc64 \
23
- && NIX_RELEASE_VERSION='2.10.2' \
24
- && curl -fsSL "${BASE_URL}""$SHA256"/get-nix.sh | sh -s -- ${NIX_RELEASE_VERSION} \
25
- && . "$HOME"/.nix-profile/etc/profile.d/nix.sh \
26
- && . ~/."$(basename $SHELL)"rc \
27
- && export TMPDIR=/tmp \
28
- && nix flake --version \
29
- && nix registry pin nixpkgs github:NixOS/nixpkgs/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b \
30
- && curl -fsSL https://raw.githubusercontent.com/ES-Nix/get-nix/"$SHA256"/install_direnv_and_nix_direnv.sh | sh \
31
- && . ~/."$(basename $SHELL)"rc \
32
- && direnv --version
33
- echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
19
+ - uses : actions/setup-python@v5
20
+ with :
21
+ python-version : ' 3.9'
22
+
23
+ - name : Install and configure Poetry
24
+ uses : snok/install-poetry@v1
25
+ with :
26
+ version : 1.8.2
27
+ virtualenvs-create : false
28
+ virtualenvs-in-project : false
29
+ virtualenvs-path : .
34
30
35
31
- name : Install dependencies
36
32
run : |
37
- nix develop .# --command sh -c 'make poetry.config.venv && make poetry.install'
33
+ make poetry.config.native
34
+ make poetry.install
38
35
39
36
- name : Lint code with black
40
37
run : |
41
- nix develop .# --command sh -c ' make fmt.check'
38
+ make fmt.check
42
39
43
40
test :
44
41
runs-on : ubuntu-22.04
45
42
steps :
46
43
- uses : actions/checkout@v4
47
44
48
- - name : Instala nix single user
49
- run : |
50
- BASE_URL='https://raw.githubusercontent.com/ES-Nix/get-nix/' \
51
- && SHA256=87fa0f1dbfdd28a1f99b39d5bd4dcc39de97bc64 \
52
- && NIX_RELEASE_VERSION='2.10.2' \
53
- && curl -fsSL "${BASE_URL}""$SHA256"/get-nix.sh | sh -s -- ${NIX_RELEASE_VERSION} \
54
- && . "$HOME"/.nix-profile/etc/profile.d/nix.sh \
55
- && . ~/."$(basename $SHELL)"rc \
56
- && export TMPDIR=/tmp \
57
- && nix flake --version \
58
- && nix registry pin nixpkgs github:NixOS/nixpkgs/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b \
59
- && curl -fsSL https://raw.githubusercontent.com/ES-Nix/get-nix/"$SHA256"/install_direnv_and_nix_direnv.sh | sh \
60
- && . ~/."$(basename $SHELL)"rc \
61
- && direnv --version
62
- echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
63
-
64
- - name : Install dependencies
65
- run : |
66
- nix develop .# --command sh -c 'make poetry.config.venv && make poetry.install'
67
-
68
- - name : Show dependencies
69
- run : |
70
- nix develop .# --command sh -c 'python --version && poetry show --tree'
71
-
72
- - name : Config env
73
- run : nix develop .# --command sh -c 'make config.env'
74
-
75
- - name : Test with pytest
76
- run : nix develop .# --command sh -c 'make test'
77
-
78
- coverage :
79
- runs-on : ubuntu-22.04
80
- needs : test
81
- steps :
82
- - uses : actions/checkout@v4
45
+ - uses : actions/setup-python@v5
46
+ with :
47
+ python-version : ' 3.9'
83
48
84
- - name : Instala nix single user
85
- run : |
86
- BASE_URL='https://raw.githubusercontent.com/ES-Nix/get-nix/' \
87
- && SHA256=87fa0f1dbfdd28a1f99b39d5bd4dcc39de97bc64 \
88
- && NIX_RELEASE_VERSION='2.10.2' \
89
- && curl -fsSL "${BASE_URL}""$SHA256"/get-nix.sh | sh -s -- ${NIX_RELEASE_VERSION} \
90
- && . "$HOME"/.nix-profile/etc/profile.d/nix.sh \
91
- && . ~/."$(basename $SHELL)"rc \
92
- && export TMPDIR=/tmp \
93
- && nix flake --version \
94
- && nix registry pin nixpkgs github:NixOS/nixpkgs/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b \
95
- && curl -fsSL https://raw.githubusercontent.com/ES-Nix/get-nix/"$SHA256"/install_direnv_and_nix_direnv.sh | sh \
96
- && . ~/."$(basename $SHELL)"rc \
97
- && direnv --version
98
- echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
49
+ - name : Install and configure Poetry
50
+ uses : snok/install-poetry@v1
51
+ with :
52
+ version : 1.8.2
53
+ virtualenvs-create : false
54
+ virtualenvs-in-project : false
55
+ virtualenvs-path : .
99
56
100
57
- name : Install dependencies
101
58
run : |
102
- nix develop .# --command sh -c 'make poetry.config.venv && make poetry.install'
59
+ make poetry.config.native
60
+ make poetry.install
103
61
104
62
- name : Config env
105
- run : |
106
- nix develop .# --command sh -c 'make config.env'
107
-
108
- - name : make coverage
109
- run : |
110
- nix develop .# --command sh -c 'make coverage'
63
+ run : make config.env
111
64
112
- - uses : codecov/codecov-action@v4
113
- with :
114
- file : ./coverage.xml # optional
65
+ - name : Test with pytest
66
+ run : make test
0 commit comments