diff --git a/.github/workflows/test_demo.yaml b/.github/workflows/test_demo.yaml new file mode 100644 index 0000000..401cff9 --- /dev/null +++ b/.github/workflows/test_demo.yaml @@ -0,0 +1,28 @@ +name: Run Demo + +on: + pull_request: + +jobs: + demo: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Check out code + uses : actions/checkout@v4 + + - name: Run compose demo + run: | + cp config/config.yaml.example config/config.yaml + cp config/iss.json.example config/iss.json + cp .env.example .env + docker compose -f docker-compose-demo.yml up -d + until [ "$(docker inspect data_loader --format='{{.State.ExitCode}}')" -ne 0 ]; do + sleep 5 + done + token=$(curl -s -k https://localhost:8080/tokens | jq -r '.[0]') + if [ curl -s -H "Authorization: Bearer $token" http://localhost:8443/metadata/datasets | jq -r .[] != "EGAD74900000101" ]; then + echo "demo failed" + exit 1 + fi + shell: bash \ No newline at end of file