Skip to content

Commit

Permalink
Configure cron job to run 4 times a day
Browse files Browse the repository at this point in the history
This can be used as a heart beat test to ensure the frontend and
backend are always running, even when there are no changes in the
app.
  • Loading branch information
wlsf82 committed Jan 10, 2025
1 parent 7f72c37 commit 9151620
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: cron

on:
schedule:
# runs four times a day (six a.m, noon, six p.m, and midnight - UTC)
- cron: '0 12,18,00,06 * * *'
workflow_dispatch:

jobs:
api-tests-prod:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run API tests in production 🧪
uses: cypress-io/github-action@v6
env:
API_URL_PROD: ${{ secrets.API_URL_PROD }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
with:
command: npm run test:api:prod:cloud
gui-tests-prod:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run GUI tests in production 🧪
uses: cypress-io/github-action@v6
env:
API_URL_PROD: ${{ secrets.API_URL_PROD }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
with:
command: npm run test:frontend:gui:prod:cloud

0 comments on commit 9151620

Please sign in to comment.