Skip to content

Commit 9ddafeb

Browse files
Move cypress to separate file
1 parent 7d623c3 commit 9ddafeb

File tree

2 files changed

+52
-45
lines changed

2 files changed

+52
-45
lines changed

.github/workflows/cypress.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Cypress Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
jobs:
10+
test-integration:
11+
name: Run Integration Chrome Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
18+
- name: Install Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
23+
- uses: pnpm/action-setup@v3
24+
with:
25+
version: 8
26+
27+
- name: Get pnpm store directory
28+
shell: bash
29+
run: |
30+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
32+
- name: Setup pnpm cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ env.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('examples/basic-pnpm/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
39+
40+
- name: Install dependencies and setup Cypress
41+
uses: cypress-io/github-action@v6
42+
with:
43+
browser: chrome
44+
build: pnpm build
45+
start: pnpm test:cy:start-server
46+
wait-on: 'http://127.0.0.1:9002'
47+
wait-on-timeout: 120

.github/workflows/test.yml

+5-45
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Lint & Test
22

33
on:
44
push:
@@ -15,27 +15,8 @@ jobs:
1515
- name: Checkout Repo
1616
uses: actions/checkout@v4
1717

18-
- name: Install Node.js
19-
uses: actions/setup-node@v3
20-
with:
21-
node-version: 18
22-
23-
- uses: pnpm/action-setup@v3
24-
with:
25-
version: 8
26-
27-
- name: Get pnpm store directory
28-
shell: bash
29-
run: |
30-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31-
32-
- name: Setup pnpm cache
33-
uses: actions/cache@v4
34-
with:
35-
path: ${{ env.STORE_PATH }}
36-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('examples/basic-pnpm/pnpm-lock.yaml') }}
37-
restore-keys: |
38-
${{ runner.os }}-pnpm-store-
18+
- name: Setup pnpm
19+
uses: wyvox/action-setup-pnpm@v3
3920

4021
# Install project dependencies
4122
- name: Install dependencies and run linting
@@ -49,27 +30,8 @@ jobs:
4930
- name: Checkout Repo
5031
uses: actions/checkout@v4
5132

52-
- name: Install Node.js
53-
uses: actions/setup-node@v3
54-
with:
55-
node-version: 18
56-
57-
- uses: pnpm/action-setup@v3
58-
with:
59-
version: 8
60-
61-
- name: Get pnpm store directory
62-
shell: bash
63-
run: |
64-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
65-
66-
- name: Setup pnpm cache
67-
uses: actions/cache@v4
68-
with:
69-
path: ${{ env.STORE_PATH }}
70-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('examples/basic-pnpm/pnpm-lock.yaml') }}
71-
restore-keys: |
72-
${{ runner.os }}-pnpm-store-
33+
- name: Setup pnpm
34+
uses: wyvox/action-setup-pnpm@v3
7335

7436
- name: Install Dependencies
7537
run: pnpm install
@@ -119,8 +81,6 @@ jobs:
11981
browser: chrome
12082
build: pnpm build
12183
start: pnpm test:cy:start-server
122-
wait-on: 'http://127.0.0.1:9002'
123-
wait-on-timeout: 120
12484

12585
automerge:
12686
needs: [test-unit, test-integration]

0 commit comments

Comments
 (0)