feat: clean up github action for EBSI Issuance CT tests #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: EBSI Conformance Test v3.2 | |
on: | |
push: | |
branches-ignore: | |
- main | |
paths: | |
- 'waltid-libraries/credentials/**' | |
- 'waltid-libraries/crypto/**' | |
- 'waltid-libraries/protocols/**' | |
- 'waltid-libraries/waltid-did/**' | |
- 'waltid-services/services/waltid-issuer-api/**' | |
- '.github/workflows/**' | |
jobs: | |
EBSI-Conformance-Test-v3: | |
runs-on: ubuntu-latest | |
steps: | |
- name: The EBSI Confornace Test v3.2 job is starting | |
run: | | |
echo -e "🔎 The EBSI Confornace Test v3.2 job is starting\n" | |
- name: Docker | |
run: docker --version | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Start ngrok tunnel | |
run: | | |
docker run --net=host -it -e NGROK_AUTHTOKEN=${{ secrets.NGROK_AUTH_TOKEN }} -d -p 4040:4040 ngrok/ngrok:latest http 7002 | |
sleep 2s | |
- name: Update config files and start Issuer API | |
run: | | |
NGROK_URL=$(curl --retry 5 --retry-delay 5 --retry-connrefused -s http://127.0.0.1:4040/api/tunnels | jq -r '.tunnels[0].public_url') | |
echo "The ngork url is ${NGROK_URL}" | |
sed -i 's|readonly ISSUER_URL=".*"|readonly ISSUER_URL="'"${NGROK_URL}"'"|g' .github/workflows/ebsictv3/EBSICTV3-IssueToHolder.sh | |
sed -i 's|baseUrl = ".*"|baseUrl = "'"${NGROK_URL}"'"|g' waltid-services/waltid-issuer-api/config/issuer-service.conf | |
docker build -t waltid/issuer-api:latest -f waltid-services/waltid-issuer-api/Dockerfile . | |
docker run --net=host -d -p 7002:7002 -v $PWD/waltid-services/waltid-issuer-api/config:/waltid-issuer-api/config --name waltid-issuer-api waltid/issuer-api:latest | |
curl --retry 5 --retry-delay 5 --retry-connrefused "${NGROK_URL}/livez" | |
- name: Execute test scripts | |
env: | |
EBSI_CT_PRIVATE_KEY_PARAM: "${{ secrets.EBSI_CT_PRIVATE_KEY_PARAM }}" | |
run: | | |
chmod +x .github/workflows/ebsictv3/EBSICTV3-IssueToHolder.sh | |
./.github/workflows/ebsictv3/EBSICTV3-IssueToHolder.sh |