Skip to content

Commit

Permalink
fix: rename unitTests to evalTests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Mar 13, 2024
1 parent 5200f00 commit 4cba21d
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/flake_evaltests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Nix Flake Eval Tests

on:
push:
branches:
- main
paths-ignore:
- "scripts/**"
- "**.md"
- "**.nu"
- 'Justfile'
pull_request:
branches:
- main
paths-ignore:
- "scripts/**"
- "**.md"
- "**.nu"
- 'Justfile'

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 Eval Tests
run: |
echo 'Flake Eval Tests'
nix eval .#evalTests --show-trace --print-build-logs --verbose
2 changes: 1 addition & 1 deletion outputs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ otherwise, it will be difficult to manage and maintain them.
Unit Tests for all flake outputs(only NixOS systems currently).

```bash
nix eval .#unitTests --show-trace --print-build-logs --verbose
nix eval .#evalTests --show-trace --print-build-logs --verbose
```

## Overview
Expand Down
2 changes: 1 addition & 1 deletion outputs/aarch64-linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ in
inherit data; # for debugging purposes

# NixOS's unit tests.
unitTests = haumea.lib.loadEvalTests {
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {inherit outputs;};
};
Expand Down
2 changes: 1 addition & 1 deletion outputs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ in {
debugAttrs = {inherit nixosSystems darwinSystems allSystems allSystemNames;};

# Unit Tests for all NixOS systems.
unitTests = lib.lists.all (it: it.unitTests == {}) nixosSystemValues;
evalTests = lib.lists.all (it: it.evalTests == {}) nixosSystemValues;

# NixOS Hosts
nixosConfigurations =
Expand Down
2 changes: 1 addition & 1 deletion outputs/riscv64-linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ in
inherit data; # for debugging purposes

# NixOS's unit tests.
unitTests = haumea.lib.loadEvalTests {
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {inherit outputs;};
};
Expand Down
2 changes: 1 addition & 1 deletion outputs/x86_64-linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ in
inherit data; # for debugging purposes

# NixOS's unit tests.
unitTests = haumea.lib.loadEvalTests {
evalTests = haumea.lib.loadEvalTests {
src = ./tests;
inputs = args // {inherit outputs;};
};
Expand Down

0 comments on commit 4cba21d

Please sign in to comment.