Skip to content

Commit

Permalink
Add CI test (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Sep 7, 2023
1 parent 1f0aa59 commit 30a3403
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "CI"
on:
# Run only when pushing to master branch, and making PRs
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Test
run: ./test/test.sh
4 changes: 4 additions & 0 deletions test/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/nix/store/3k5m5hpb07bchbdymlwkn0n06vn09src-foo-0.1.0.0
/nix/store/y5gw89k3ch5gx9aqxazxqll6g8da1j26-ghc-shell-for-packages-0
/nix/store/zfh0052wf0ndn0033lg5x7kf4s72kfgw-bar-0.1.0.0
/nix/store/zfh0052wf0ndn0033lg5x7kf4s72kfgw-bar-0.1.0.0/bin/bar
11 changes: 11 additions & 0 deletions test/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set -euxo pipefail

cd "$(dirname "$0")"
rm -f result

nix build .. --override-input flake github:srid/haskell-multi-nix/c85563721c388629fa9e538a1d97274861bc8321 -L --no-link --print-out-paths | xargs cat | sort | uniq \
> result

diff expected result

rm -f result

0 comments on commit 30a3403

Please sign in to comment.