Skip to content

Merge pull request #577 from DavHau/dependabot/github_actions/actions… #487

Merge pull request #577 from DavHau/dependabot/github_actions/actions…

Merge pull request #577 from DavHau/dependabot/github_actions/actions… #487

Workflow file for this run

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@v4
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@v4
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@v4
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@v4
# 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