Skip to content

Commit

Permalink
Make export path writable from within container and adopt file afterw…
Browse files Browse the repository at this point in the history
…ards

Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Mar 20, 2024
1 parent 43539f0 commit c5927e4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
-v ${{ github.workspace }}:/postgres-export:rw
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
# Make sure the postgres container is has a exp-data directory
volumes:
- ${{ github.workspace }}:/postgres-export

steps:
- name: Checkout ReBench
Expand Down Expand Up @@ -92,15 +90,18 @@ jobs:
- name: Run ReBench Integration Tests
run: |
# make workspace writable for postgres container
chmod a+wx ${{ github.workspace }}
# start ReBenchDB server
NODE_DATA_EXPORT_PATH=${{ github.workspace }} RDB_DATA_EXPORT_PATH=/postgres-export DEV=true npm run start &
sleep 5
# run integration tests
pushd tests/rebench-integration
rebench --experiment IntegrationTest rebench.conf
ls -lah /home/runner/work/ReBenchDB/ReBenchDB/dist/src/backend/../../../src/../resources/exp-data/
sleep 1
PROJID=$(curl -s http://localhost:33333/ReBenchDB-integration-test/data | grep project-id | grep -o -E '[0-9]+')
EXPID=$(curl -s http://localhost:33333/rebenchdb/dash/$PROJID/data-overview | jq '.data[0].expid')
Expand All @@ -109,6 +110,10 @@ jobs:
curl -s http://localhost:33333/ReBenchDB-integration-test/data/$EXPID.csv.gz > /dev/null
sleep 10 # give the server some time to generate the files
# reposses the files to be able to read them
sudo chown $(whoami):$(id -g -n) ${{ github.workspace }}/*.gz
# fetch the generated files via node and check them
curl -sL http://localhost:33333/ReBenchDB-integration-test/data/$EXPID.json.gz -o actual.json.gz
curl -sL http://localhost:33333/ReBenchDB-integration-test/data/$EXPID.csv.gz -o actual.csv.gz
gzip -k -d actual.json.gz
Expand Down

0 comments on commit c5927e4

Please sign in to comment.