Skip to content

Commit

Permalink
fix: cypress run
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti committed Apr 7, 2024
1 parent a9154d6 commit 7a47287
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 32 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
only_notify: true
token: ${{ secrets.GITHUB_TOKEN }}

test:
name: Lint, E2E Test
test:
name: Lint and Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand All @@ -63,17 +63,10 @@ jobs:
- name: Install Dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Start
run: pnpm start &
shell: bash
- name: Build the project
run: pnpm run build

- name: Cypress run
uses: cypress-io/github-action@v3
with:
project: ./cypress
browser: chrome
start: ''
wait-on: "http://localhost:3000"
- name: Run Tests
run: pnpm run test
env:
CI: true
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"start": "next start -p 3000",
"preview": "next start",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "yarn run lint -- --fix",
"lint:fix": "pnpm run lint -- --fix",
"prettier": "prettier src --check",
"prettier:fix": "yarn run prettier -- --write",
"format": "yarn run prettier:fix && yarn run lint:fix",
"format:check": "yarn run prettier && yarn run lint",
"prettier:fix": "pnpm run prettier -- --write",
"format": "pnpm run prettier:fix && yarn run lint:fix",
"format:check": "pnpm run prettier && yarn run lint",
"prepare": "husky install && wonderland-crypto-husky-checks install",
"test": "yarn cypress run",
"test:watch": "yarn cypress open"
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"test": "start-server-and-test start http://localhost:3000 'pnpm run cypress:run'"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix",
Expand Down Expand Up @@ -68,6 +69,7 @@
"jsdom": "24.0.0",
"lodash.merge": "4.6.2",
"prettier": "3.0.3",
"start-server-and-test": "2.0.3",
"styled-components": "6.0.7",
"typescript": "5.4.2"
}
Expand Down
123 changes: 114 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a47287

Please sign in to comment.