Skip to content

Commit

Permalink
feat: use self hosted for e2e (#34)
Browse files Browse the repository at this point in the history
* feat: split build and test

* feat: build-rspack-binding.yaml

* feat: build-rspack-js.yaml

* fix: binding name and download path

* fix: move artifacts

* chore: force commit sha to test

* fix: move addon to npm/linux-x64-gnu

* feat: local cache for rspack rust

* feat: use rust cache

* feat: lint and format

* chore: refactor by action

* feat: improve .github/workflows/ecosystem-ci-from-commit.yml

* feat: add ref for action

* feat: use self hosted run e2e

* feat: remove key for rust cache

* chore: revert ci suite

* fix: should install playwright with deps

* fix: remove unused deno

* feat: only modernjs use self-hosted

* feat: use self-hosted in eco ci commit
  • Loading branch information
SyMind committed Mar 14, 2024
1 parent e484fb3 commit 3cbcea3
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 48 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,28 @@ jobs:

ci:
needs: [get-runner-labels, prepare-binding]
runs-on: ubuntu-latest
strategy:
matrix:
suite:
- _selftest
- modernjs
- nx
- rspress
- rsbuild
- compat
- examples
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
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-rspack
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Format
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ecosystem-ci-from-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ jobs:
- uses: ./.github/actions/build-rspack
with:
ref: ${{ inputs.commitSHA }}
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- run: pnpm i --frozen-lockfile
- run: >-
pnpm tsx ecosystem-ci.ts
Expand All @@ -83,26 +79,30 @@ jobs:
${{ inputs.suite }}
execute-all:
runs-on: ubuntu-latest
needs: [get-runner-labels, prepare-binding]
if: "inputs.suite == '-'"
strategy:
matrix:
suite:
- modernjs
- nx
- rspress
- rsbuild
- compat
- examples
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
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-rspack
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- run: pnpm i --frozen-lockfile
- run: >-
pnpm tsx ecosystem-ci.ts
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/ecosystem-ci-from-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down Expand Up @@ -116,10 +112,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/ecosystem-ci-selected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down Expand Up @@ -111,10 +107,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
continue-on-error: true
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion tests/modernjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function test(options: RunOptions) {
branch: process.env.MODERN_REF ?? 'main',
beforeTest: async () => {
cd('tests/e2e/builder')
await $`pnpm playwright install chromium`
await $`pnpm playwright install --with-deps chromium`
cd('../../../')
},
test: ['test:rspack'],
Expand Down
2 changes: 1 addition & 1 deletion tests/rsbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function test(options: RunOptions) {
branch: process.env.RSBUILD_REF ?? 'main',
beforeTest: async () => {
cd('./e2e')
await $`pnpm playwright install`
await $`pnpm playwright install --with-deps`
cd('..')
},
test: ['e2e:rspack'],
Expand Down
2 changes: 1 addition & 1 deletion tests/rspress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function test(options: RunOptions) {
repo: 'web-infra-dev/rspress',
branch: process.env.RSPRESS_REF ?? 'main',
beforeTest: async () => {
await $`pnpm playwright install`
await $`pnpm playwright install --with-deps`
},
test: ['test'],
})
Expand Down

0 comments on commit 3cbcea3

Please sign in to comment.