Skip to content

rsbuild-ecosystem-ci-selected #9

rsbuild-ecosystem-ci-selected

rsbuild-ecosystem-ci-selected #9

# integration tests for rsbuild ecosystem - run for selected one testsuite or all testsuites
name: rsbuild-ecosystem-ci-selected
env:
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
on:
workflow_dispatch:
inputs:
refType:
description: "type of rsbuild ref to use"
required: true
type: choice
options:
- branch
- tag
- commit
- release
default: "branch"
ref:
description: "rsbuild ref to use"
required: true
type: string
default: "main"
repo:
description: "rsbuild repository to use"
required: true
type: string
default: "web-infra-dev/rsbuild"
suite:
description: "testsuite to run. runs all testsuits when `-`."
required: true
type: choice
options:
- "-"
- modernjs
- plugins
- rspress
- rslib
- examples
suiteRefType:
description: "type of suite ref to use"
required: true
type: choice
options:
- precoded
- branch
- tag
- commit
default: "precoded"
suiteRef:
description: "suite ref to use"
required: true
type: string
default: "precoded"
jobs:
execute-selected-suite:
runs-on: ubuntu-latest
if: "inputs.suite != '-'"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-rsbuild
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
- run: pnpm i --frozen-lockfile
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }}
${{ inputs.suite }}
execute-all:
if: "inputs.suite == '-'"
strategy:
matrix:
include:
- suite: modernjs
os: ubuntu-latest
- suite: plugins
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: rslib
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: execute-all (${{ matrix.suite }})
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-rsbuild
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
- run: pnpm i --frozen-lockfile
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
${{ matrix.suite }}