Run backend API endpoint healthchecks #121691
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 backend API endpoint healthchecks | |
on: | |
schedule: | |
- cron: '*/15 * * * *' | |
jobs: | |
healthcheck: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Run API checks | |
run: cd healthchecks && npm install && REVITA_USER_TOKEN="${{ secrets.REVITA_USER_TOKEN }}" npm run test | |
- name: Report failure | |
if: failure() | |
run: curl -d '{"text":"Backend healthcheck failed"}' -H "Content-Type:application/json" -X POST ${{ secrets.REVITA_SLACK_WEBHOOK }} |