feat: unit tests

This commit is contained in:
Ryan Yin
2024-03-13 14:47:36 +08:00
parent be963c0642
commit fff6ad6bff
17 changed files with 142 additions and 59 deletions

View File

@@ -1,24 +0,0 @@
name: Nix Flake Check
on: [push, pull_request, workflow_dispatch]
jobs:
checks:
name: Check expressions
runs-on: ubuntu-latest
steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Install nix
# uses: cachix/install-nix-action@v24
# with:
# install_url: https://nixos.org/nix/install
# extra_nix_config: |
# access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
# experimental-features = nix-command flakes
- name: Run Nix Flake Check
run: |
echo 'TODO: nix flake check'
# nix flake check

24
.github/workflows/flake_unittests.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Nix Flake Unit Tests
on: [push, pull_request, workflow_dispatch]
jobs:
checks:
name: Check expressions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v24
with:
install_url: https://nixos.org/nix/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
experimental-features = nix-command flakes
- name: Run Nix Flake Unit Tests
run: |
echo 'Flake Unit Tests'
nix eval .#unitTests --show-trace --print-build-logs --verbose