Run API tests #1022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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: 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 }} |