Skip to content

Test Public Studios #165

Test Public Studios

Test Public Studios #165

name: Test Public Studios
on:
schedule:
- cron: '30 12 * * *' # Fire at 12:30 p.m. (noon) every day
jobs:
e2e-studio-cron-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main # Test the main branch (usually contains the code in production)
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Prune containers
run: |
docker system prune -af
- name: install dependencies 🚀
run: |
yarn install --frozen-lockfile # optional, --immutable
- name: run cypress tests
id: e2eTests
run: |
export CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}; yarn cy:publicstudios
- name: Send error notification
id: slack
if: ${{ failure() && steps.e2eTests.conclusion == 'failure' }}
uses: slackapi/[email protected]
with:
channel-id: 'team-nise-alerts'
payload: |
{
"text": "Failure in the public studios e2e cron job",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build ID: ${{ github.run_id }}\n URL: https://github.com/BlueBrain/nexus-web/actions/runs/${{ github.run_id }}\n ${{steps.e2eTests.outputs}}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Cleanup Docker Containers
if: ${{ always() }}
run: docker-compose -f ci/docker-compose.yml down --rmi "local" --volumes