Skip to content

Commit

Permalink
Move no_cluster test to a script
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Feb 6, 2024
1 parent c5606b0 commit 172bd24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,7 @@ jobs:
# Test NO_CLUSTER
- name: Test NO_CLUSTER
env: { NO_CLUSTER: true }
run: |-
docker run -w /repo --rm pgxn-tools-test pg-start ${{ matrix.pg }}
if [ $? -ne 0 ]; then
echo "ERROR: error returned from script"
exit 1
fi
if [ -d /var/lib/postgresql/${{ matrix.pg }}/test ]; then
echo "ERROR: /var/lib/postgresql/${{ matrix.pg }}/test should not exist!"
exit 1
fi
run: "docker run -w /repo --rm --volume \"$(pwd):/repo\" pgxn-tools-test ./test/no_cluster_test.sh ${{ matrix.pg }}"

publish:
# Publish for a tag starting with v.
Expand Down
12 changes: 12 additions & 0 deletions test/no_cluster_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

pgversion=$1
if ! pg-start "$pgversion"; then
echo "ERROR: error returned from script"
exit 1
fi

if [ -d "/var/lib/postgresql/$pgversion/test" ]; then
echo "ERROR: /var/lib/postgresql/$pgversion/test should not exist!"
exit 1;
fi

0 comments on commit 172bd24

Please sign in to comment.