Skip to content

Commit

Permalink
Add webhooks integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Mihaela Balutoiu <[email protected]>
  • Loading branch information
mihaelabalutoiu committed Aug 22, 2023
1 parent 9a7fbde commit abb40b1
Show file tree
Hide file tree
Showing 4 changed files with 342 additions and 32 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ jobs:
- name: Build GARM
run: make build

- name: Set up ngrok
id: ngrok
uses: gabriel-samfira/[email protected]
with:
ngrok_authtoken: ${{ secrets.NGROK_AUTH_TOKEN }}
port: 9997
tunnel_type: http

- name: Setup GARM
run: ./test/integration/scripts/setup-garm.sh
env:
GH_OAUTH_TOKEN: ${{ secrets.GH_OAUTH_TOKEN }}
CREDENTIALS_NAME: test-garm-creds
GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }}

- name: Generate secrets
run: |
Expand All @@ -45,14 +54,6 @@ jobs:
echo "GARM_PASSWORD=$GARM_PASSWORD" >> $GITHUB_ENV
echo "REPO_WEBHOOK_SECRET=$REPO_WEBHOOK_SECRET" >> $GITHUB_ENV
echo "ORG_WEBHOOK_SECRET=$ORG_WEBHOOK_SECRET" >> $GITHUB_ENV
- name: Set up ngrok
id: ngrok
uses: gabriel-samfira/[email protected]
with:
ngrok_authtoken: ${{ secrets.NGROK_AUTH_TOKEN }}
port: 9997
tunnel_type: http
- name: Create logs directory
if: always()
Expand All @@ -72,6 +73,7 @@ jobs:
ORG_NAME: gsamfira
REPO_NAME: garm-testing
CREDENTIALS_NAME: test-garm-creds
WORKFLOW_FILE_NAME: test.yml
GH_TOKEN: ${{ secrets.GH_OAUTH_TOKEN }}

- name: Show GARM logs
Expand Down
6 changes: 4 additions & 2 deletions test/integration/config/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[default]
callback_url = "http://${GARM_METADATA_IP}:9997/api/v1/callbacks/status"
metadata_url = "http://${GARM_METADATA_IP}:9997/api/v1/metadata"
callback_url = "${GARM_BASE_URL}/api/v1/callbacks/status"
metadata_url = "${GARM_BASE_URL}/api/v1/metadata"
webhook_url = "${GARM_BASE_URL}/webhooks"
enable_webhook_management = true

[metrics]
enable = true
Expand Down
Loading

0 comments on commit abb40b1

Please sign in to comment.