51 lines (48 loc) · 1.67 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
name: "CI"
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
tests:
strategy:
matrix:
python-version: [ 38, 39 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
submodules: recursive
- uses: cachix/install-nix-action@v12
with:
install_url: https://releases.nixos.org/nix/nix-2.3.10/install
extra_nix_config: "system-features = benchmark kvm"
- name: Run tests on Python${{ matrix.python-version }}
run: |
nix-shell --argstr pyVersion ${{ matrix.python-version }} --run \
"pip install -e . && pip install -r requirements/test.txt && pip install -r requirements/extras/third_party.txt && make test"
- name: Coveralls [upload]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: python${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
nix-shell --argstr pyVersion ${{ matrix.python-version }} --arg isDevEnv false --run "coveralls --service=github"
coveralls:
name: Coveralls [finalize]
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
submodules: recursive
- uses: cachix/install-nix-action@v12
with:
install_url: https://releases.nixos.org/nix/nix-2.3.10/install
extra_nix_config: "system-features = benchmark kvm"
- name: Coveralls [finalize]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
nix-shell --arg isDevEnv false --run "coveralls --service=github --finish"