rslib-ecosystem-ci-from-commit #279
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # integration tests for rslib ecosystem - run from pr comments | |
| name: rslib-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: 'rslib repository to use' | |
| required: true | |
| type: string | |
| default: 'web-infra-dev/rslib' | |
| suite: | |
| description: 'testsuite to run. runs all test suites when `-`.' | |
| required: false | |
| type: choice | |
| options: | |
| - '-' | |
| - rsbuild | |
| - rspack | |
| - rstest | |
| - rspress | |
| - rsdoctor | |
| - modernjs | |
| 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@v6 | |
| - uses: ./.github/actions/build-rslib | |
| with: | |
| repository: ${{ inputs.repo }} | |
| ref: ${{ inputs.commitSHA }} | |
| - 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 rslib | |
| --suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }} | |
| ${{ inputs.suite }} | |
| execute-all: | |
| if: "inputs.suite == '-'" | |
| strategy: | |
| matrix: | |
| include: | |
| - suite: rsbuild | |
| os: ubuntu-latest | |
| - suite: rspack | |
| os: ubuntu-latest | |
| - suite: rstest | |
| os: ubuntu-latest | |
| - suite: rspress | |
| os: ubuntu-latest | |
| - suite: rsdoctor | |
| os: ubuntu-latest | |
| - suite: modernjs | |
| os: ubuntu-latest | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| name: execute-all (${{ matrix.suite }}) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: moonrepo/setup-rust@v1 | |
| - uses: ./.github/actions/build-rslib | |
| with: | |
| repository: ${{ inputs.repo }} | |
| ref: ${{ inputs.commitSHA }} | |
| - 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 rslib | |
| ${{ matrix.suite }} |