Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 736b291

Browse files
committed
Setup node 12
1 parent 0585e5d commit 736b291

File tree

1 file changed

+62
-61
lines changed

1 file changed

+62
-61
lines changed

.github/workflows/build-and-test.yml

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,65 @@ name: build and test
33
on: [push]
44

55
jobs:
6-
install-dependencies:
7-
runs-on: ubuntu-latest
8-
env:
9-
CI: true
10-
strategy:
11-
matrix:
12-
node-version: [12.x]
13-
steps:
14-
- uses: actions/checkout@v2
15-
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
16-
- run: yarn install --frozen-lockfile --check-files
17-
- uses: actions/cache@v1
18-
id: cache-deps
19-
with:
20-
token: ${{ github.token }}
21-
path: '.'
22-
key: ${{ github.sha }}-deps
23-
lint:
24-
runs-on: ubuntu-latest
25-
needs: install-dependencies
26-
steps:
27-
- uses: actions/cache@v1
28-
id: restore-deps
29-
with:
30-
path: '.'
31-
key: ${{ github.sha }}-deps
32-
- run: yarn lint
33-
unit-test:
34-
runs-on: ubuntu-latest
35-
needs: install-dependencies
36-
steps:
37-
- uses: actions/cache@v1
38-
id: restore-deps
39-
with:
40-
path: '.'
41-
key: ${{ github.sha }}-deps
42-
- run: yarn test
43-
build:
44-
runs-on: ubuntu-latest
45-
needs: install-dependencies
46-
strategy:
47-
matrix:
48-
node-version: [12.x]
49-
steps:
50-
- uses: actions/cache@v1
51-
id: restore-deps
52-
with:
53-
path: '.'
54-
key: ${{ github.sha }}
55-
- name: Use Node.js ${{ matrix.node-version }}
56-
uses: actions/setup-node@v1
57-
with:
58-
node-version: ${{ matrix.node-version }}
59-
# HACK(johnrjj) - Rebuild node-sass in case build step runs on a separate machine than the dependency install
60-
- run: npm rebuild node-sass
61-
- run: yarn build:prod
62-
- uses: actions/cache@v1
63-
id: cache-build
64-
with:
65-
path: '.'
66-
key: ${{ github.sha }}-build
6+
install-dependencies:
7+
runs-on: ubuntu-latest
8+
env:
9+
CI: true
10+
steps:
11+
- uses: actions/checkout@v2
12+
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
13+
- name: Setup node 12
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12.x
17+
- run: yarn install --frozen-lockfile --check-files
18+
- uses: actions/cache@v1
19+
id: cache-deps
20+
with:
21+
token: ${{ github.token }}
22+
path: '.'
23+
key: ${{ github.sha }}-deps
24+
lint:
25+
runs-on: ubuntu-latest
26+
needs: install-dependencies
27+
steps:
28+
- uses: actions/cache@v1
29+
id: restore-deps
30+
with:
31+
path: '.'
32+
key: ${{ github.sha }}-deps
33+
- run: yarn lint
34+
unit-test:
35+
runs-on: ubuntu-latest
36+
needs: install-dependencies
37+
steps:
38+
- uses: actions/cache@v1
39+
id: restore-deps
40+
with:
41+
path: '.'
42+
key: ${{ github.sha }}-deps
43+
- run: yarn test
44+
build:
45+
runs-on: ubuntu-latest
46+
needs: install-dependencies
47+
strategy:
48+
matrix:
49+
node-version: [12.x]
50+
steps:
51+
- uses: actions/cache@v1
52+
id: restore-deps
53+
with:
54+
path: '.'
55+
key: ${{ github.sha }}
56+
- name: Use Node.js ${{ matrix.node-version }}
57+
uses: actions/setup-node@v1
58+
with:
59+
node-version: ${{ matrix.node-version }}
60+
# HACK(johnrjj) - Rebuild node-sass in case build step runs on a separate machine than the dependency install
61+
- run: npm rebuild node-sass
62+
- run: yarn build:prod
63+
- uses: actions/cache@v1
64+
id: cache-build
65+
with:
66+
path: '.'
67+
key: ${{ github.sha }}-build

0 commit comments

Comments
 (0)