-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (58 loc) · 2.44 KB
/
verify_registry_daily.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Verify Registry Deployment (3scale-dev)
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
verify-registry:
name: Verify 3scale Registry Deployment
runs-on: ubuntu-latest
if: github.repository_owner == 'apicurio'
steps:
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Code Checkout
run: |
mkdir repo
cd repo
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-3scale-gitops.git"
git fetch
git checkout main
git branch --set-upstream-to=origin/main
git pull
- name: Run e2e tests
run: |
cd repo/tests/registry
npm install
npx playwright install --with-deps
export REGISTRY_URL=${{ secrets.REGISTRY_URL }}
export TEST_USERNAME=${{ secrets.TEST_USERNAME }}
export TEST_PASSWORD=${{ secrets.TEST_PASSWORD }}
npm run test
- name: Upload Test Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: repo/tests/registry/playwright-report/
retention-days: 3
- name: Slack Notification (Always)
if: always()
run: |
MESSAGE="Nightly Registry integration tests completed with status: ${{ job.status }}"
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_NOTIFICATION_WEBHOOK }}
- name: Slack Notification (Error)
if: failure()
run: |
MESSAGE="Nightly Registry integration tests FAILED."
REPO="${{ github.repository }}"
LINK="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
PAYLOAD="{\"workflow\": \"${{ github.workflow }}\", \"status\": \"${{ job.status }}\", \"message\": \"$MESSAGE\", \"link\": \"$LINK\", \"repository\": \"$REPO\"}"
curl -X POST -H "Content-Type: application/json" -d "$PAYLOAD" ${{ secrets.SLACK_ERROR_WEBHOOK }}