Skip to content

Commit a1fb056

Browse files
committed
Make test.sh build example; also set -e
1 parent ea29723 commit a1fb056

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ jobs:
1111
- uses: actions/checkout@v3
1212
- name: Install Nix
1313
uses: DeterminateSystems/nix-installer-action@main
14-
- name: Build example flake
15-
id: example
16-
run: |
17-
cd ./example
18-
nix build -L --override-input process-compose-flake ..
1914
- name: Run test
2015
id: test
2116
run: |

test/test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
set -euxo pipefail
2+
13
cd "$(dirname "$0")"
4+
5+
# First, build the example.
6+
(cd ../example && nix build -L --override-input process-compose-flake ..)
7+
8+
# Then run the test.
29
rm -f ./data.sqlite
310
nix run -L --override-input process-compose-flake .. .
411
[[ $(cat result.txt) == "Hello" ]] && echo "Test passed" || (echo "Test failed" && exit 1)

0 commit comments

Comments
 (0)