Skip to content

Commit

Permalink
Pipeline for executing Storage on demand ui tests (#2113)
Browse files Browse the repository at this point in the history
* add test-storage-on-demand.yml

* update folder in screenshots to be storage
  • Loading branch information
juans-chainsafe authored May 3, 2022
1 parent 325820a commit 15ac409
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/test-storage-on-demand.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Cypress tests - Storage (On Demand)
on: [workflow_dispatch]
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.17.0-chrome91-ff89
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/cache@v2
id: yarn-build-cache
with:
path: |
**/node_modules
~/.cache/Cypress
**/build
key: ${{ runner.os }}-node_modules-build-storage-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v2
env:
REACT_APP_BLOCKNATIVE_ID: ${{ secrets.GH_REACT_APP_BLOCKNATIVE_ID }}
REACT_APP_FILES_VERIFIER_NAME: ${{ secrets.GH_REACT_APP_FILES_VERIFIER_NAME }}
REACT_APP_FILES_UUID_VERIFIER_NAME: 'chainsafe-uuid-testnet'
REACT_APP_TEST: 'true'
DEBUG: '@cypress/github-action'
with:
start: yarn start:storage-ui
# wait for 10min for the server to be ready
wait-on: 'npx wait-on --timeout 600000 http://localhost:3000'
# custom test command to run
command: yarn test:ci:storage-ui
# store the screenshots if the tests fail
- name: Store screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: packages/storage-ui/cypress/screenshots
# store the videos if the tests fail
# - name: Store videos
# uses: actions/upload-artifact@v1
# if: failure()
# with:
# name: cypress-videos
# path: packages/storage-ui/cypress/videos

- name: Slack Notification
uses: rtCamp/[email protected]
env:
SLACK_TITLE: 'Storage UI Test Suite On-Demand Result:'
SLACK_MESSAGE: ${{ job.status }}
SLACK_COLOR: ${{ job.status }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_UI_WEBHOOK }}
SLACK_FOOTER: 'Test run ${{ github.run_number }} was executed on branch: ${{ github.ref }}'

0 comments on commit 15ac409

Please sign in to comment.