Skip to content

Commit

Permalink
Decouple jest-puppeteer config and test apps build
Browse files Browse the repository at this point in the history
  • Loading branch information
martpie committed Jul 28, 2020
1 parent db5b57f commit 0b8a51f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@ jobs:
run: bash .github/workflows/setup_puppeteer.sh
if: startsWith(matrix.os,'ubuntu')

- name: Install tests apps dependencies
- name: Install tests apps dependencies (basic)
run: npm ci --prefix=src/__tests__/__apps__/basic

- name: Build test app (basic)
run: npm run build --prefix=src/__tests__/__apps__/basic

- name: Install tests apps dependencies (webpack 5)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/webpack-5

- name: Build test app (yarn workspaces)
run: yarn --cwd src/__tests__/__apps__/webpack-5 run build

- name: Install tests apps dependencies (yarn workspaces)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/yarn-workspaces

- name: Build test app (yarn workspaces)
run: yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run build

- name: 'Test: unit & end-to-end tests'
run: npm test

Expand Down
12 changes: 6 additions & 6 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ module.exports = {
},
server: [
{
command: `npm run build --prefix=${basicAppPath} && npm run start --prefix=${basicAppPath}`,
launchTimeout: 300000,
command: `npm run start --prefix=${basicAppPath}`,
launchTimeout: 20000,
port: 3000
},
{
command: `yarn --cwd ${yarnWorkspacesAppPath} run build && yarn --cwd ${yarnWorkspacesAppPath} run start -- --port 3001`,
launchTimeout: 300000,
command: `yarn --cwd ${yarnWorkspacesAppPath} run start -- --port 3001`,
launchTimeout: 20000,
port: 3001
},
{
command: `yarn --cwd ${webpack5AppPath} run build && yarn --cwd ${webpack5AppPath} run start -- --port 3002`,
launchTimeout: 300000, // Apparently, building is heck slow on Webpack 5 :shrug:
command: `yarn --cwd ${webpack5AppPath} run start -- --port 3002`,
launchTimeout: 20000,
port: 3002
}
]
Expand Down

0 comments on commit 0b8a51f

Please sign in to comment.