-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.33 KB
/
run-api-tests.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
name: Run API tests
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
api-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Import Secrets
uses: hashicorp/vault-action@v2.3.0
with:
url: ${{ secrets.VAULT_ADDR }}
token: ${{ secrets.CI_SECRET_READER_PERIODIC_TOKEN }}
caCertificate: ${{ secrets.VAULTCA }}
secrets: |
ci/data/gh-workflows/did-resolution-test-suite SLACK_WEBHOOK_URL | SLACK_WEBHOOK_URL
- name: Install dependencies
run: npm install
- name: Run API tests
run: npm test
- name: Push results to gh-pages
run: |
chmod +x ./ci/push-report.sh
./ci/push-report.sh
- name: Send Slack notification for testcases
run: npx cypress-slack-reporter --custom-text "Host=https://dev.uniresolver.io/1.0/identifiers/" --ci-provider custom --custom-url https://w3c-ccg.github.io/did-resolution-test-suite --report-dir "gh-pages/${{ env.date_with_time }}/mochareports"
- name: Slack notification
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,commit,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}