Skip to content

Configure ci test

Configure ci test #20

Workflow file for this run

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
with:
submodules: recursive
- 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: 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' || '' }}