54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
|
|
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
|
|
|