forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.5 KB
/
example-start-and-yarn-workspaces.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: example-start-and-yarn-workspaces
on:
push:
branches:
- 'master'
pull_request:
jobs:
single:
# the example has Yarn workspace in its "root" folder
# examples/start-and-yarn-workspaces
# and tests in a subfolder like "workspace-1"
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Tests
uses: ./
with:
working-directory: examples/start-and-yarn-workspaces/workspace-1
build: yarn run build
start: yarn start
wait-on: 'http://localhost:5000'
multiple:
# example with web application build,
# server start and waiting for the server
# to respond before running tests
# in each Yarn workspaces subfolder
runs-on: ubuntu-20.04
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
cypress:
- working_directory: examples/start-and-yarn-workspaces/workspace-1
- working_directory: examples/start-and-yarn-workspaces/workspace-2
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress tests
uses: ./
with:
working-directory: ${{ matrix.cypress.working_directory }}
build: yarn run build
start: yarn start
wait-on: 'http://localhost:5000'