|
8 | 8 | - main
|
9 | 9 | - minor
|
10 | 10 |
|
11 |
| -permissions: |
12 |
| - contents: read # to fetch code (actions/checkout) |
13 |
| - |
14 | 11 | jobs:
|
15 |
| - unit-test: |
16 |
| - runs-on: ubuntu-latest |
17 |
| - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
18 |
| - env: |
19 |
| - PUPPETEER_SKIP_DOWNLOAD: 'true' |
20 |
| - steps: |
21 |
| - - uses: actions/checkout@v4 |
22 |
| - |
23 |
| - - name: Install pnpm |
24 |
| - uses: pnpm/action-setup@v4.0.0 |
25 |
| - |
26 |
| - - name: Install Node.js |
27 |
| - uses: actions/setup-node@v4 |
28 |
| - with: |
29 |
| - node-version-file: '.node-version' |
30 |
| - cache: 'pnpm' |
31 |
| - |
32 |
| - - run: pnpm install |
33 |
| - |
34 |
| - - name: Run unit tests |
35 |
| - run: pnpm run test-unit |
36 |
| - |
37 |
| - unit-test-windows: |
38 |
| - runs-on: windows-latest |
39 |
| - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
40 |
| - env: |
41 |
| - PUPPETEER_SKIP_DOWNLOAD: 'true' |
42 |
| - steps: |
43 |
| - - uses: actions/checkout@v4 |
44 |
| - |
45 |
| - - name: Install pnpm |
46 |
| - uses: pnpm/action-setup@v4.0.0 |
47 |
| - |
48 |
| - - name: Install Node.js |
49 |
| - uses: actions/setup-node@v4 |
50 |
| - with: |
51 |
| - node-version-file: '.node-version' |
52 |
| - cache: 'pnpm' |
53 |
| - |
54 |
| - - run: pnpm install |
55 |
| - |
56 |
| - - name: Run compiler unit tests |
57 |
| - run: pnpm run test-unit compiler |
58 |
| - |
59 |
| - - name: Run ssr unit tests |
60 |
| - run: pnpm run test-unit server-renderer |
61 |
| - |
62 |
| - e2e-test: |
63 |
| - runs-on: ubuntu-latest |
64 |
| - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
65 |
| - steps: |
66 |
| - - uses: actions/checkout@v4 |
67 |
| - |
68 |
| - - name: Setup cache for Chromium binary |
69 |
| - uses: actions/cache@v4 |
70 |
| - with: |
71 |
| - path: ~/.cache/puppeteer |
72 |
| - key: chromium-${{ hashFiles('pnpm-lock.yaml') }} |
73 |
| - |
74 |
| - - name: Install pnpm |
75 |
| - uses: pnpm/action-setup@v4.0.0 |
76 |
| - |
77 |
| - - name: Install Node.js |
78 |
| - uses: actions/setup-node@v4 |
79 |
| - with: |
80 |
| - node-version-file: '.node-version' |
81 |
| - cache: 'pnpm' |
82 |
| - |
83 |
| - - run: pnpm install |
84 |
| - - run: node node_modules/puppeteer/install.mjs |
85 |
| - |
86 |
| - - name: Run e2e tests |
87 |
| - run: pnpm run test-e2e |
88 |
| - |
89 |
| - - name: verify treeshaking |
90 |
| - run: node scripts/verify-treeshaking.js |
91 |
| - |
92 |
| - lint-and-test-dts: |
93 |
| - runs-on: ubuntu-latest |
94 |
| - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
95 |
| - env: |
96 |
| - PUPPETEER_SKIP_DOWNLOAD: 'true' |
97 |
| - steps: |
98 |
| - - uses: actions/checkout@v4 |
99 |
| - |
100 |
| - - name: Install pnpm |
101 |
| - uses: pnpm/action-setup@v4.0.0 |
102 |
| - |
103 |
| - - name: Install Node.js |
104 |
| - uses: actions/setup-node@v4 |
105 |
| - with: |
106 |
| - node-version-file: '.node-version' |
107 |
| - cache: 'pnpm' |
108 |
| - |
109 |
| - - run: pnpm install |
110 |
| - |
111 |
| - - name: Run eslint |
112 |
| - run: pnpm run lint |
113 |
| - |
114 |
| - - name: Run prettier |
115 |
| - run: pnpm run format-check |
116 |
| - |
117 |
| - - name: Run type declaration tests |
118 |
| - run: pnpm run test-dts |
119 |
| - |
120 |
| - # benchmarks: |
121 |
| - # runs-on: ubuntu-latest |
122 |
| - # if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository |
123 |
| - # env: |
124 |
| - # PUPPETEER_SKIP_DOWNLOAD: 'true' |
125 |
| - # steps: |
126 |
| - # - uses: actions/checkout@v4 |
127 |
| - |
128 |
| - # - name: Install pnpm |
129 |
| - # uses: pnpm/action-setup@v3.0.0 |
130 |
| - |
131 |
| - # - name: Install Node.js |
132 |
| - # uses: actions/setup-node@v4 |
133 |
| - # with: |
134 |
| - # node-version-file: '.node-version' |
135 |
| - # cache: 'pnpm' |
136 |
| - |
137 |
| - # - run: pnpm install |
138 |
| - |
139 |
| - # - name: Run benchmarks |
140 |
| - # uses: CodSpeedHQ/action@v2 |
141 |
| - # with: |
142 |
| - # run: pnpm vitest bench --run |
143 |
| - # token: ${{ secrets.CODSPEED_TOKEN }} |
| 12 | + test: |
| 13 | + if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }} |
| 14 | + uses: ./.github/workflows/test.yml |
0 commit comments