-
Notifications
You must be signed in to change notification settings - Fork 921
75 lines (62 loc) · 2.17 KB
/
cypress.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Cypress Tests on Multiple Configurations
on:
push:
branches:
- cli
pull_request:
branches:
- cli-solidity-frameworks
# TODO change to cli
# - cli
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
config: [hardhat, foundry, no_solidity_framework]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install Dependencies
run: yarn
- name: Start dev
run: yarn dev &
- name: Install application (Hardhat configuration)
if: matrix.config == 'hardhat'
run: yarn cli new_project --install -f hardhat
- name: Install Foundry
if: matrix.config == 'foundry'
uses: foundry-rs/foundry-toolchain@v1
- name: Add Foundry to PATH
if: matrix.config == 'foundry'
run: echo "$HOME/.foundry/bin" >> $GITHUB_PATH
- name: Install application (Foundry configuration)
if: matrix.config == 'foundry'
run: yarn cli new_project --install -f foundry
- name: Install application (No solidity framework configuration)
if: matrix.config == 'no_solidity_framework'
run: yarn cli new_project --install -f none
- name: Run chain and deploy
working-directory: new_project
if: matrix.config == 'hardhat' || matrix.config == 'foundry'
run: yarn install & yarn chain & yarn deploy
- name: Run Cypress tests for apps with solidity frameworks
uses: cypress-io/github-action@v6
if: matrix.config == 'hardhat' || matrix.config == 'foundry'
with:
start: yarn start
wait-on: "http://localhost:3000"
working-directory: new_project/packages/nextjs
browser: chrome
- name: Run Cypress tests for apps without solidity frameworks
uses: cypress-io/github-action@v6
if: matrix.config == 'no_solidity_framework'
with:
start: yarn start
wait-on: "http://localhost:3000"
working-directory: new_project/packages/nextjs
spec: cypress/e2e/base/base.cy.ts
browser: chrome