Skip to content

Commit 9387720

Browse files
authored
ci: split GH actions (GoogleCloudPlatform#217)
* ci: split unit and conformance ci Signed-off-by: Grant Timmerman <timmerman+devrel@google.com> * ci: add lint workflow Signed-off-by: Grant Timmerman <timmerman+devrel@google.com> * ci: fix lint workflow Signed-off-by: Grant Timmerman <timmerman+devrel@google.com> * ci: matrix test Signed-off-by: Grant Timmerman <timmerman+devrel@google.com> * ci: posttest should not lint Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
1 parent 63cb628 commit 9387720

File tree

4 files changed

+45
-13
lines changed

4 files changed

+45
-13
lines changed
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
1-
name: Node.js CI
2-
1+
name: Node.js Conformance CI
32
on: [push, pull_request]
4-
53
jobs:
64
build:
7-
85
runs-on: ubuntu-18.04
9-
106
strategy:
117
matrix:
128
node-version: [10.x, 12.x, 14.x]
13-
149
steps:
1510
- uses: actions/setup-go@v2
1611
with:
1712
go-version: '1.14'
18-
1913
- uses: actions/checkout@v2
2014
- name: Use Node.js ${{ matrix.node-version }}
2115
uses: actions/setup-node@v1
2216
with:
2317
node-version: ${{ matrix.node-version }}
24-
- run: npm install
25-
- run: npm run build --if-present
26-
- run: npm test
27-
- run: npm run test-conformance
18+
- name: Install dependencies
19+
run: npm install
20+
- name: Build TypeScript project
21+
run: npm run build --if-present
22+
- name: Test
23+
run: npm run test-conformance
2824
env:
2925
CI: true

.github/workflows/lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Node.js Lint CI
2+
on: [push, pull_request]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-18.04
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Setup Node.js
9+
uses: actions/setup-node@v1
10+
- name: Install dependencies
11+
run: npm install
12+
- name: Build TypeScript project
13+
run: npm run build --if-present
14+
- name: Lint
15+
run: npm run check

.github/workflows/unit.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Node.js Unit CI
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
node-version: [10.x, 12.x, 14.x]
8+
platform: [ubuntu-latest, macos-latest, windows-latest]
9+
runs-on: ${{ matrix.platform }}
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Use Node.js ${{ matrix.node-version }}
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ matrix.node-version }}
17+
- name: Install dependencies
18+
run: npm install
19+
- name: Build TypeScript project
20+
run: npm run build --if-present
21+
- name: Test
22+
run: npm test

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"compile": "tsc -p .",
2323
"fix": "gts fix",
2424
"prepare": "npm run compile",
25-
"pretest": "npm run compile",
26-
"posttest": "npm run check"
25+
"pretest": "npm run compile"
2726
},
2827
"files": [
2928
"build/src/*.js",

0 commit comments

Comments
 (0)