Skip to content

rsbuild-ecosystem-ci-from-commit #1201

rsbuild-ecosystem-ci-from-commit

rsbuild-ecosystem-ci-from-commit #1201

# integration tests for rsbuild ecosystem - run from pr comments
name: rsbuild-ecosystem-ci-from-commit
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:
commitSHA:
description: 'commit sha'
required: true
type: string
repo:
description: 'rsbuild repository to use'
required: true
type: string
default: 'web-infra-dev/rsbuild'
suite:
description: 'testsuite to run. runs all test suites when `-`.'
required: false
type: choice
options:
- '-'
- modernjs
- plugins
- rspress
-
- 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'
updateComment:
description: 'update comment'
required: false
type: boolean
default: false
jobs:
execute-selected-suite:
runs-on: ubuntu-latest
if: "inputs.suite != '-'"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/build-rsbuild
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.commitSHA }}
- run: pnpm i --frozen-lockfile
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rsbuild
--suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }}
${{ inputs.suite }}
execute-all:
if: "inputs.suite == '-'"
strategy:
matrix:
include:
- suite: rslib
os: ubuntu-latest
- suite: rstest
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: plugins
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: execute-all (${{ matrix.suite }})
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1
- uses: ./.github/actions/build-rsbuild
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.commitSHA }}
- run: pnpm i --frozen-lockfile
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rsbuild
${{ matrix.suite }}
update-history:
needs: [execute-all]
if: ${{ always() && inputs.suite == '-' }}
permissions:
contents: write
actions: read
uses: ./.github/workflows/_update-history.yml
with:
stack: rsbuild
repo: ${{ inputs.repo }}
commitSHA: ${{ inputs.commitSHA }}