Skip to content

Run API tests

Run API tests #550

Workflow file for this run

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 }}