Skip to content

Commit

Permalink
fix: split modernjs test
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Apr 19, 2024
1 parent 86bf3c2 commit 1bc18c2
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 26 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,17 @@ jobs:
strategy:
matrix:
include:
- suite: modernjs
os: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }}
- suite: _selftest
os: ubuntu-latest
- suite: modernjs-builder
- suite: modernjs-framework
- suite: modernjs-garfish
- suite: nx
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: rsbuild
os: ubuntu-latest
- suite: compat
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-rspack
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/ecosystem-ci-from-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,17 @@ jobs:
strategy:
matrix:
include:
- suite: modernjs
os: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }}
- suite: _selftest
os: ubuntu-latest
- suite: nx
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: rsbuild
os: ubuntu-latest
- suite: compat
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
include:
- suite: modernjs-builder
- suite: modernjs-framework
- suite: modernjs-garfish
- suite: nx
- suite: rspress
- suite: rsbuild
- suite: compat
- suite: examples
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-rspack
Expand Down
4 changes: 2 additions & 2 deletions tests/modernjs.ts → tests/modernjs-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export async function test(options: RunOptions) {
beforeTest: async () => {
cd('tests/e2e/builder')
await $`pnpm playwright install --with-deps chromium`
cd('../../../')
cd('../../')
},
test: ['test:rspack'],
test: ['pnpm run test:builder:rspack'],
})
}
14 changes: 14 additions & 0 deletions tests/modernjs-framework.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { runInRepo, cd, $ } from '../utils'

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (_selftest)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (modernjs-builder)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (modernjs-framework)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (modernjs-garfish)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (nx)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (rspress)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (rsbuild)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (compat)

'$' is defined but never used

Check warning on line 1 in tests/modernjs-framework.ts

View workflow job for this annotation

GitHub Actions / ci (examples)

'$' is defined but never used
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'web-infra-dev/modern.js',
branch: process.env.MODERN_REF ?? 'main',
beforeTest: async () => {
cd('tests')
},
test: ['pnpm run test:framework'],
})
}
16 changes: 16 additions & 0 deletions tests/modernjs-garfish.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { runInRepo, cd, $ } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'web-infra-dev/modern.js',
branch: process.env.MODERN_REF ?? 'main',
beforeTest: async () => {
cd('tests/e2e/builder')
await $`pnpm playwright install --with-deps chromium`
cd('../../')
},
test: ['pnpm run test:garfish:rspack'],
})
}

0 comments on commit 1bc18c2

Please sign in to comment.