Skip to content

Commit

Permalink
build outside of playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Jun 6, 2024
1 parent 4575e1c commit 9db8cd3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
with:
node-version: lts/*
cache: yarn
- run: yarn install
- name: Install packages
run: yarn install
- name: Install Playwright browsers
run: yarn playwright install --with-deps
- name: Build dApp
run: yarn dapp build
- name: Run Playwright tests
run: yarn test:e2e
- uses: actions/upload-artifact@v4
Expand Down
3 changes: 1 addition & 2 deletions apps/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"start": "next start",
"test": "jest --passWithNoTests",
"test:watch": "jest --watch",
"test:e2e": "cp .env.testnet .env && playwright test",
"test:e2e": "cp .env.testnet .env.local && playwright test",
"ts": "tsc --noEmit --incremental",
"ts:watch": "ts --watch"
},
Expand Down Expand Up @@ -62,7 +62,6 @@
"@types/node": "^20.14.2",
"@types/react": "^17.0.37",
"autoprefixer": "^9.8.6",
"dotenv": "^16.4.5",
"eslint": "^8.23.1",
"eslint-plugin-header": "^3.1.1",
"next-i18next": "^11.0.0",
Expand Down
9 changes: 1 addition & 8 deletions apps/dapp/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// GNU AFFERO GENERAL PUBLIC LICENSE Version 3. Copyright (C) 2022 DAO DAO Contributors.
// See the "LICENSE" file in the root directory of this package for more copyright information.
import { defineConfig, devices } from '@playwright/test'
import dotenv from 'dotenv'

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
dotenv.config()

/**
* See https://playwright.dev/docs/test-configuration.
Expand Down Expand Up @@ -73,7 +66,7 @@ export default defineConfig({

/* Build and run server before starting the tests */
webServer: {
command: 'yarn build && yarn start',
command: 'yarn start',
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
// allow 10 minutes for the server to build
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12854,11 +12854,6 @@ dotenv@^16.0.0, dotenv@^16.3.1:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

dotenv@^8.0.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"
Expand Down

0 comments on commit 9db8cd3

Please sign in to comment.