Skip to content

Commit 2173b46

Browse files
committed
Run test via Nix
1 parent 947de21 commit 2173b46

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/build.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v4
3030
- uses: cachix/install-nix-action@v27
31+
with:
32+
extra_nix_config:
33+
accept-flake-config = true
3134
# https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html
3235
# with:
3336
# extra_nix_config: |
@@ -49,8 +52,10 @@ jobs:
4952
# run: |
5053
# ./bin/${{ matrix.devShell }} -c ghc --version
5154
# ./bin/${{ matrix.devShell }} -c cabal --version
52-
- run: nix build --accept-flake-config
55+
- run: nix build
5356
timeout-minutes: 10
57+
- run: nix run .#test
58+
timeout-minutes: 5
5459
# timeout-minutes: 5
5560
# - name: Update package index
5661
# run: ./bin/${{ matrix.devShell }} -c cabal update

flake.nix

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
flake = pkgs.hapistrano.flake { };
3333
in
3434
flake // {
35-
packages.default = flake.packages."hapistrano:exe:hap";
35+
apps.test = {
36+
type = "app";
37+
program = "${flake.packages."hapistrano:test:test"}/bin/test";
38+
};
39+
packages.default = flake.packages." hapistrano:exe:hap ";
3640
});
3741
}
42+
43+

0 commit comments

Comments
 (0)