forked from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (53 loc) · 1.82 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
name: Cypress Tests on Multiple Configurations
on:
push:
branches:
- main
pull_request:
branches:
- configure-ci-test
# TODO change to main
# - main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
config: [foundry]
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_hardhat -s 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_foundry -s foundry
- name: Install application (No solidity framework configuration)
if: matrix.config == 'no_solidity_framework'
run: yarn cli new_project_no_solidity_framework -s none
- name: Run chain and deploy
working-directory: new_project_${{ matrix.config }}
if: matrix.config == 'hardhat' || matrix.config == 'foundry'
run: yarn install & yarn chain & yarn deploy
- name: Run Cypress tests
uses: cypress-io/github-action@v6
with:
start: yarn start
wait-on: "http://localhost:3000"
working-directory: new_project_${{ matrix.config }}/packages/nextjs
browser: chrome
spec: ${{ matrix.config == 'no_solidity_framework' && 'cypress/e2e/base/base.cy.ts' || '' }}