mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
Cypress browser matrix (#665)
* use cypress matrix * fix workflow indentation * fix workflow job name * add dummy containers for parallelization
This commit is contained in:
parent
41aa1248be
commit
60d8697b09
73
.github/workflows/cypress.yml
vendored
73
.github/workflows/cypress.yml
vendored
@ -3,12 +3,31 @@ name: Cypress Tests
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cypress-chrome:
|
cypress:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
containers: [1, 2, 3, 4, 5]
|
||||||
|
os: ["ubuntu-latest", "windows-latest"]
|
||||||
|
browser: [chrome, firefox, edge]
|
||||||
|
exclude:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
browser: edge
|
||||||
|
- os: windows-latest
|
||||||
|
browser: firefox
|
||||||
|
- os: windows-latest
|
||||||
|
browser: chrome
|
||||||
|
include:
|
||||||
|
- browser: firefox
|
||||||
|
container:
|
||||||
|
image: cypress/browsers:node14.17.0-chrome88-ff89
|
||||||
|
options: --user 1001
|
||||||
|
name: E2E tests on ${{ matrix.browser }} - ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Chrome Browser Tests
|
- name: ${{ matrix.browser }} browser tests
|
||||||
uses: cypress-io/github-action@v2
|
uses: cypress-io/github-action@v2
|
||||||
with:
|
with:
|
||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
@ -17,50 +36,10 @@ jobs:
|
|||||||
wait-on: 'http://localhost:4200'
|
wait-on: 'http://localhost:4200'
|
||||||
wait-on-timeout: 120
|
wait-on-timeout: 120
|
||||||
record: true
|
record: true
|
||||||
browser: chrome
|
parallel: true
|
||||||
env:
|
group: Tests on ${{ matrix.browser }}
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
browser: ${{ matrix.browser }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
|
||||||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
|
|
||||||
DEBUG: 'cypress:*'
|
|
||||||
cypress-firefox:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: cypress/browsers:node14.17.0-chrome88-ff89
|
|
||||||
options: --user 1001
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Firefox Browser Tests
|
|
||||||
uses: cypress-io/github-action@v2
|
|
||||||
with:
|
|
||||||
working-directory: frontend
|
|
||||||
build: npm run config:defaults
|
|
||||||
start: npm run start:local-prod
|
|
||||||
wait-on: 'http://localhost:4200'
|
|
||||||
wait-on-timeout: 120
|
|
||||||
record: true
|
|
||||||
browser: firefox
|
|
||||||
env:
|
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
|
|
||||||
DEBUG: 'cypress:*'
|
|
||||||
cypress-edge:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Edge Browser Tests
|
|
||||||
uses: cypress-io/github-action@v2
|
|
||||||
with:
|
|
||||||
working-directory: frontend
|
|
||||||
build: npm run config:defaults
|
|
||||||
start: npm run start:local-prod
|
|
||||||
wait-on: 'http://localhost:4200'
|
|
||||||
wait-on-timeout: 120
|
|
||||||
record: true
|
|
||||||
browser: edge
|
|
||||||
env:
|
env:
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user