Skip to content

rspack-ecosystem-ci-selected #74

rspack-ecosystem-ci-selected

rspack-ecosystem-ci-selected #74

# integration tests for rspack ecosystem - run for selected one testsuite or all testsuites
name: rspack-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 rspack ref to use"
required: true
type: choice
options:
- branch
- tag
- commit
- release
default: "branch"
ref:
description: "rspack ref to use"
required: true
type: string
default: "main"
repo:
description: "rspack repository to use"
required: true
type: string
default: "web-infra-dev/rspack"
suite:
description: "testsuite to run. runs all testsuits when `-`."
required: true
type: choice
options:
- "-"
- modernjs
- nx
jobs:
execute-selected-suite:
runs-on: ubuntu-latest
if: "inputs.suite != '-'"
steps:
- uses: actions/checkout@v3
- 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
- run: >-
pnpm tsx ecosystem-ci.ts
--${{ inputs.refType }} ${{ inputs.ref }}
--repo ${{ inputs.repo }}
${{ inputs.suite }}
- if: always()
run: pnpm tsx discord-webhook.ts
env:
WORKFLOW_NAME: ci-selected-one
REF_TYPE: ${{ inputs.refType }}
REF: ${{ inputs.ref }}
REPO: ${{ inputs.repo }}
SUITE: ${{ inputs.suite }}
STATUS: ${{ job.status }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
execute-all:
runs-on: ubuntu-latest
if: "inputs.suite == '-'"
strategy:
matrix:
suite:
- modernjs
- nx
fail-fast: false
steps:
- uses: actions/checkout@v3
- 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
- run: >-
pnpm tsx ecosystem-ci.ts
--${{ inputs.refType }} ${{ inputs.ref }}
--repo ${{ inputs.repo }}
${{ matrix.suite }}
- if: always()
run: pnpm tsx discord-webhook.ts
env:
WORKFLOW_NAME: ci-selected-all
REF_TYPE: ${{ inputs.refType }}
REF: ${{ inputs.ref }}
REPO: ${{ inputs.repo }}
SUITE: ${{ matrix.suite }}
STATUS: ${{ job.status }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}