Skip to content

rspress-ecosystem-ci-selected #15

rspress-ecosystem-ci-selected

rspress-ecosystem-ci-selected #15

# integration tests for rspress ecosystem - run for selected one testsuite or all testsuites
name: rspress-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 rspress ref to use"
required: true
type: choice
options:
- branch
- tag
- commit
- release
default: "branch"
ref:
description: "rspress ref to use"
required: true
type: string
default: "main"
repo:
description: "rspress repository to use"
required: true
type: string
default: "web-infra-dev/rspress"
suite:
description: "testsuite to run. runs all test suites when `-`."
required: true
type: choice
options:
- "-"
- rsbuild
- rslib
- rspack
- rstest
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 != '-'"
env:
ECOSYSTEM_CI_REF: ${{ inputs.ref }}
ECOSYSTEM_CI_TYPE: 'branch'
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
RSPRESS_NETLIFY_SITE_ID_RSBUILD: ${{ secrets.RSPRESS_NETLIFY_SITE_ID_RSBUILD }}
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/build-rspress
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
--stack rspress
--suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }}
${{ inputs.suite }}
execute-all:
if: "inputs.suite == '-'"
env:
ECOSYSTEM_CI_REF: ${{ inputs.ref }}
ECOSYSTEM_CI_TYPE: 'branch'
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
RSPRESS_NETLIFY_SITE_ID_RSBUILD: ${{ secrets.RSPRESS_NETLIFY_SITE_ID_RSBUILD }}
strategy:
matrix:
include:
- suite: rsbuild
os: ubuntu-latest
- suite: rslib
os: ubuntu-latest
- suite: rspack
os: ubuntu-latest
- suite: rstest
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: execute-all (${{ matrix.suite }})
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/build-rspress
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
--stack rspress
${{ matrix.suite }}