forked from DavHau/mach-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.3 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
name: "mach-nix CI"
on:
pull_request:
branches: ["master"]
push:
branches: [master, dev, "ci*" ]
jobs:
## tasks per matrix element
nixVersion:
name: Test Nix version - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ]
python-version: [3.7]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install/Setup - NIX
uses: cachix/install-nix-action@v13
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
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
- name: mach-nix evaluation tests
run: |
wget https://github.com/DavHau/nix-portable/releases/download/v008/nix-portable
chmod +x nix-portable
WORKERS=5 ./nix-portable nix run .#tests-all
shell: bash