This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (41 loc) · 1.55 KB
/
checkly.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
# This GitHub Actions workflow triggers after receiving a Deployment Status event from GH Actions environment. This works
# with providers like Vercel, Heroku and others. This workflow does the following
#
# - Runs after deployment event
# - Uses the target_url provided in the deployment event
# - Dry run all the checks on Checkly
# - If the dry run passes, deploy the checks.
#
# You can of course trigger the Checkly CLI in other workflows or steps inside your GH Action configuration.
name: checkly
on: [deployment_status]
env:
ENVIRONMENT_URL: ${{ github.event.deployment_status.target_url }}
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }}
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }}
jobs:
test-e2e:
if: github.event.deployment_status.state == 'success'
name: Test E2E on Checkly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Restore or cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Run checks
id: run-checks
run: npm run checkly:test -- -e ENVIRONMENT_URL=${{ env.ENVIRONMENT_URL }}
continue-on-error: false
- name: Deploy checks
if: steps.run-checks.outcome == 'success'
run: npm run checkly:deploy