-
Notifications
You must be signed in to change notification settings - Fork 106
109 lines (90 loc) · 2.45 KB
/
CI_NixPy.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: "mach-nix CI"
on:
pull_request:
branches: ["master"]
push:
branches: [master, dev, "ci*" ]
jobs:
## tasks per matrix element
cli-test:
name: Test mach-nix cli - ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install/Setup - NIX
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = true
sandbox-fallback = false
- name: nix-env installation
run: nix-env -if . -A mach-nix
shell: bash
- name: cli test
run: |
export MACHNIX_VERSION=$GITHUB_SHA
mach-nix --version
echo "tensorflow" > reqs.txt
mach-nix env ./env -r reqs.txt
shell: bash
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install/Setup - NIX
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = true
sandbox-fallback = false
- name: mach-nix unit tests
run: |
WORKERS=5 nix run .#tests-unit
shell: bash
eval-tests:
name: Eval Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install/Setup - NIX
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
sandbox = true
sandbox-fallback = false
- name: mach-nix eval tests
run: |
WORKERS=5 nix run .#tests-eval
shell: bash
# conda-eval-tests:
# name: Eval Tests (with conda)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 1
# - name: Install/Setup - NIX
# uses: cachix/install-nix-action@v23
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# extra_nix_config: |
# experimental-features = nix-command flakes
# sandbox = true
# sandbox-fallback = false
# - name: mach-nix eval tests
# run: |
# WORKERS=5 CONDA_TESTS=y nix run .#tests-eval
# shell: bash