-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (41 loc) · 1.18 KB
/
ci-test.yml
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
name: CI Test
on:
pull_request:
branches: [master]
repository_dispatch:
types: [ci-test]
workflow_dispatch: # for manual testing
jobs:
test:
runs-on: ubuntu-latest
steps:
# setup
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
# test code
- name: Run tests
run: npm test
# generate and lint types
- name: Generate types
run: npm start -- --cache-discovery-json ${{ runner.temp }}
- name: Lint types
id: lint
run: npm run lint
env:
GAPI_MAX_PARALLEL: 3
# upload failed type for investigation
- name: Copy discovery service response
if: failure()
run: cp ${{ runner.temp }}/${{ steps.lint.outputs.FAILED_TYPE }}.json types/${{ steps.lint.outputs.FAILED_TYPE }}
- name: Upload failed type
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ steps.lint.outputs.FAILED_TYPE }}
path: types/${{ steps.lint.outputs.FAILED_TYPE }}