|
1 | 1 | name: CI |
2 | | -on: [push, pull_request] |
| 2 | +on: workflow_call |
3 | 3 | jobs: |
4 | 4 | save-github-event: |
5 | 5 | name: "Save `github.event` as an artifact to use in subsequent 'workflow_run' actions" |
@@ -183,67 +183,6 @@ jobs: |
183 | 183 | - name: Run Tests |
184 | 184 | run: npm run testonly |
185 | 185 |
|
186 | | - benchmark: |
187 | | - name: Run benchmark |
188 | | - runs-on: ubuntu-latest |
189 | | - if: github.event_name == 'pull_request' |
190 | | - steps: |
191 | | - - name: Checkout repo |
192 | | - uses: actions/checkout@v2 |
193 | | - with: |
194 | | - persist-credentials: false |
195 | | - |
196 | | - - name: Deepen cloned repo |
197 | | - env: |
198 | | - BASE_SHA: ${{ github.event.pull_request.base.sha }} |
199 | | - run: 'git fetch --depth=1 origin $BASE_SHA:refs/tags/BASE' |
200 | | - |
201 | | - - name: Setup Node.js |
202 | | - uses: actions/setup-node@v2 |
203 | | - with: |
204 | | - cache: npm |
205 | | - node-version-file: '.node-version' |
206 | | - |
207 | | - - name: Install Dependencies |
208 | | - run: npm ci --ignore-scripts |
209 | | - |
210 | | - - name: Run Benchmark |
211 | | - run: 'npm run benchmark -- --revs HEAD BASE' |
212 | | - |
213 | | - diff-npm-package: |
214 | | - name: Diff content of NPM package |
215 | | - runs-on: ubuntu-latest |
216 | | - if: github.event_name == 'pull_request' |
217 | | - steps: |
218 | | - - name: Checkout repo |
219 | | - uses: actions/checkout@v2 |
220 | | - with: |
221 | | - persist-credentials: false |
222 | | - |
223 | | - - name: Deepen cloned repo |
224 | | - env: |
225 | | - BASE_SHA: ${{ github.event.pull_request.base.sha }} |
226 | | - run: 'git fetch --depth=1 origin $BASE_SHA:refs/tags/BASE' |
227 | | - |
228 | | - - name: Setup Node.js |
229 | | - uses: actions/setup-node@v2 |
230 | | - with: |
231 | | - cache: npm |
232 | | - node-version-file: '.node-version' |
233 | | - |
234 | | - - name: Install Dependencies |
235 | | - run: npm ci --ignore-scripts |
236 | | - |
237 | | - - name: Generate report |
238 | | - run: 'node resources/diff-npm-package.js BASE HEAD' |
239 | | - |
240 | | - - name: Upload generated report |
241 | | - uses: actions/upload-artifact@v2 |
242 | | - with: |
243 | | - name: npm-dist-diff.html |
244 | | - path: ./npm-dist-diff.html |
245 | | - if-no-files-found: ignore |
246 | | - |
247 | 186 | build-npm-dist: |
248 | 187 | name: Build 'npmDist' artifact |
249 | 188 | runs-on: ubuntu-latest |
|
0 commit comments