2022-08-22 13:01:50 +02:00
|
|
|
name: Budibase Nightly Tests
|
2022-01-14 15:18:39 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2022-03-29 18:50:52 +02:00
|
|
|
schedule:
|
|
|
|
- cron: "0 5 * * *" # every day at 5AM
|
|
|
|
|
2022-01-14 15:18:39 +01:00
|
|
|
jobs:
|
2022-08-22 13:01:50 +02:00
|
|
|
nightly:
|
2022-01-14 15:18:39 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js 14.x
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14.x
|
|
|
|
- run: yarn
|
|
|
|
- run: yarn bootstrap
|
|
|
|
- run: yarn build
|
|
|
|
- name: Pull cypress.env.yaml from budibase-infra
|
|
|
|
run: |
|
|
|
|
curl -H "Authorization: token ${{ secrets.GH_PERSONAL_TOKEN }}" \
|
|
|
|
-H 'Accept: application/vnd.github.v3.raw' \
|
|
|
|
-o packages/builder/cypress.env.json \
|
|
|
|
-L https://api.github.com/repos/budibase/budibase-infra/contents/test/cypress.env.json
|
2022-01-14 15:25:59 +01:00
|
|
|
wc -l packages/builder/cypress.env.json
|
2022-03-29 18:50:52 +02:00
|
|
|
|
|
|
|
- name: Cypress run
|
|
|
|
id: cypress
|
2022-04-06 16:09:51 +02:00
|
|
|
continue-on-error: true
|
2022-03-29 18:50:52 +02:00
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
with:
|
2022-05-06 10:19:50 +02:00
|
|
|
record: true
|
2022-03-29 18:50:52 +02:00
|
|
|
install: false
|
2022-05-17 00:08:05 +02:00
|
|
|
tag: nightly
|
2022-05-03 16:52:46 +02:00
|
|
|
command: yarn test:e2e:ci:record
|
2022-05-03 11:06:54 +02:00
|
|
|
env:
|
|
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
2022-01-14 15:18:39 +01:00
|
|
|
|
2022-05-18 20:55:41 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-03-29 18:50:52 +02:00
|
|
|
with:
|
2022-05-18 20:55:41 +02:00
|
|
|
name: Test Reports
|
2022-05-20 17:47:09 +02:00
|
|
|
path: packages/builder/cypress/reports/testReport.html
|
2022-01-14 15:18:39 +01:00
|
|
|
|
2022-08-22 13:01:50 +02:00
|
|
|
# TODO: enable once running in QA test env
|
|
|
|
# - name: Configure AWS Credentials
|
|
|
|
# uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
# with:
|
|
|
|
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
# aws-region: eu-west-1
|
|
|
|
|
|
|
|
# - name: Upload test results HTML
|
|
|
|
# uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
# run: aws s3 cp packages/builder/cypress/reports/testReport.html s3://{{ secrets.BUDI_QA_REPORTS_BUCKET_NAME }}/$GITHUB_RUN_ID/index.html
|
|
|
|
|
2022-05-18 20:55:41 +02:00
|
|
|
- name: Cypress Discord Notify
|
2022-05-20 17:47:09 +02:00
|
|
|
run: yarn test:e2e:ci:notify
|
2022-05-18 20:55:41 +02:00
|
|
|
env:
|
|
|
|
CYPRESS_WEBHOOK_URL: ${{ secrets.BUDI_QA_WEBHOOK }}
|
|
|
|
CYPRESS_OUTCOME: ${{ steps.cypress.outcome }}
|
|
|
|
CYPRESS_DASHBOARD_URL: ${{ steps.cypress.outputs.dashboardUrl }}
|
2022-05-20 17:47:09 +02:00
|
|
|
GITHUB_RUN_URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
|