Skip to content

Commit 0c0d0c4

Browse files
MikeMcC399aayushshah15
authored andcommitted
test: convert pnpm workflow to os matrix (cypress-io#1226)
1 parent 58b09aa commit 0c0d0c4

File tree

1 file changed

+9
-75
lines changed

1 file changed

+9
-75
lines changed

.github/workflows/example-basic-pnpm.yml

+9-75
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ on:
88

99
jobs:
1010

11-
basic-pnpm-ubuntu-20:
12-
runs-on: ubuntu-20.04
11+
basic-pnpm:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-22.04, windows-2022, macos-14]
16+
runs-on: ${{ matrix.os }}
1317
steps:
1418
- name: Checkout
1519
uses: actions/checkout@v4
@@ -18,82 +22,12 @@ jobs:
1822
run: npm install -g pnpm@9
1923

2024
- name: Cypress tests
21-
# normally you would write
25+
# if you copy this workflow to another repository
26+
# take the next line as replacement for ./
2227
# uses: cypress-io/github-action@v6
2328
uses: ./
24-
# the parameters below are only necessary
25-
# because we are running these examples in a monorepo
2629
with:
2730
working-directory: examples/basic-pnpm
28-
# just for full picture after installing Cypress
2931
# print information about detected browsers, etc
3032
# see https://on.cypress.io/command-line#cypress-info
31-
build: npx cypress info
32-
33-
basic-pnpm-ubuntu-22:
34-
runs-on: ubuntu-22.04
35-
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v4
38-
39-
- name: Install pnpm
40-
run: npm install -g pnpm@9
41-
42-
- name: Cypress tests
43-
uses: ./
44-
with:
45-
working-directory: examples/basic-pnpm
46-
build: npx cypress info
47-
48-
basic-pnpm-on-windows:
49-
runs-on: windows-latest
50-
steps:
51-
- name: Checkout
52-
uses: actions/checkout@v4
53-
54-
- name: Install pnpm
55-
run: npm install -g pnpm@9
56-
57-
- name: Cypress tests
58-
uses: ./
59-
with:
60-
working-directory: examples/basic-pnpm
61-
build: npx cypress info
62-
63-
basic-pnpm-on-mac:
64-
runs-on: macos-latest
65-
steps:
66-
- name: Checkout
67-
uses: actions/checkout@v4
68-
69-
- name: Install pnpm
70-
run: npm install -g pnpm@9
71-
72-
- name: Cypress tests
73-
uses: ./
74-
with:
75-
working-directory: examples/basic-pnpm
76-
build: npx cypress info
77-
78-
# skips the binary installation
79-
# shows that the job should not fail
80-
# https://github.com/cypress-io/github-action/issues/327
81-
basic-pnpm-without-binary-install:
82-
runs-on: ubuntu-22.04
83-
steps:
84-
- name: Checkout
85-
uses: actions/checkout@v4
86-
87-
- name: Install pnpm
88-
run: npm install -g pnpm@9
89-
90-
- name: Cypress tests
91-
uses: ./
92-
with:
93-
working-directory: examples/basic-pnpm
94-
# since we do not install Cypress
95-
# we should not attempt to run tests
96-
runTests: false
97-
env:
98-
# skip the binary install
99-
CYPRESS_INSTALL_BINARY: 0
33+
build: pnpm exec cypress info

0 commit comments

Comments
 (0)