Remove old tests and add development workflow tests

This commit is contained in:
adisbladis 2022-01-08 21:22:01 +13:00
parent 1c6887b5bf
commit 5b9621cd6c
2 changed files with 10 additions and 10 deletions

View file

@ -1,4 +1,4 @@
name: "Test"
name: "Development workflow - nix-shell"
on:
pull_request:
push:
@ -13,5 +13,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v16
- name: build
run: NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz nix-build --expr '(import <nixpkgs> { }).callPackage ./. { }'
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build
run: nix-shell --run 'meson build && cd build && ninja'
- name: Run tests
run: nix-shell --run 'pytest ./tests'

View file

@ -1,4 +1,4 @@
name: "Flake test"
name: "Development workflow - flakes"
on:
pull_request:
push:
@ -16,11 +16,7 @@ jobs:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v16
- name: List flake structure
run: nix flake show
- name: Build
run: nix build --out-link result
run: nix develop -c bash -c 'meson build && cd build && ninja'
- name: Run tests
run: |
nix develop -c install -D ./result/bin/nix-eval-jobs ./build/src/nix-eval-jobs
nix develop -c pytest ./tests
run: nix develop -c pytest ./tests