-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrspress-ecosystem-ci-from-commit.yml
More file actions
120 lines (115 loc) · 3.44 KB
/
Copy pathrspress-ecosystem-ci-from-commit.yml
File metadata and controls
120 lines (115 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# integration tests for rspress ecosystem - run from pr comments
name: rspress-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: 'rspress repository to use'
required: true
type: string
default: 'web-infra-dev/rspress'
suite:
description: 'testsuite to run. runs all test suites when `-`.'
required: false
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'
updateComment:
description: 'update comment'
required: false
type: boolean
default: false
jobs:
execute-selected-suite:
runs-on: ubuntu-latest
if: "inputs.suite != '-'"
env:
ECOSYSTEM_CI_REF: ${{ inputs.commitSHA }}
ECOSYSTEM_CI_TYPE: 'commit'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/build-rspress
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 rspress
--suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }}
${{ inputs.suite }}
execute-all:
if: "inputs.suite == '-'"
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 }})
env:
ECOSYSTEM_CI_REF: ${{ inputs.commitSHA }}
ECOSYSTEM_CI_TYPE: 'commit'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1
- uses: ./.github/actions/build-rspress
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 rspress
${{ matrix.suite }}
update-history:
needs: [execute-all]
if: ${{ always() && inputs.suite == '-' }}
permissions:
contents: write
actions: read
uses: ./.github/workflows/_update-history.yml
with:
stack: rspress
repo: ${{ inputs.repo }}
commitSHA: ${{ inputs.commitSHA }}