Skip to content

Smoke Tests Nightly - Heroku #41

Smoke Tests Nightly - Heroku

Smoke Tests Nightly - Heroku #41

name: Smoke Tests Nightly - Heroku
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-e2e-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-e2e
- name: Run smoke tests against heroku
run: yarn e2e cypress run
env:
cypress_DESIGNER_URL: https://digital-form-builder-designer.herokuapp.com
cypress_RUNNER_URL: https://digital-form-builder-runner.herokuapp.com
- name: Send slack CI alert
id: slack
uses: slackapi/[email protected]
with:
# For posting a rich message using Block Kit
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":rotating_light: Nightly smoke tests failed",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action CI result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Scan image
uses: anchore/scan-action@v2
with:
image: "ghcr.io/digital-form-builder-runner:latest"
acs-report-enable: true
fail-build: false
severity-cutoff: critical
- name: Scan image
uses: anchore/scan-action@v2
with:
image: "ghcr.io/digital-form-builder-designer:latest"
acs-report-enable: true
fail-build: false
severity-cutoff: critical
deploy:
needs: test
uses: ./.github/workflows/deploy-development.yml
secrets: inherit
strategy:
matrix:
app: [ designer, runner ]
with:
app: ${{ matrix.app }}
tag: ${{ needs.assign-semver.outputs.SEMVER }}