-
-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (53 loc) · 1.57 KB
/
nodejs.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
47
48
49
50
51
52
53
54
55
56
57
name: Node CI
on: [push]
jobs:
check-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js latest
uses: actions/setup-node@v2-beta
with:
node-version: "*"
- name: Install dependencies
run: |
yarn install
yarn check
- name: Build artifact
run: |
yarn build
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: bundled
path: dist
test:
needs: check-and-build
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [10.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
- name: Get test dependencies versions
id: test-dep-versions
run: |
echo "::set-output name=postcss-tape::$(node scripts/get-dev-deps postcss-tape)"
echo "::set-output name=postcss::$(node scripts/get-dev-deps postcss)"
- name: yarn install
run: |
yarn workspaces focus -A --production
yarn add --dev postcss-tape@${{ steps.test-dep-versions.outputs.postcss-tape }} postcss@${{ steps.test-dep-versions.outputs.postcss }}
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: bundled
path: dist
- name: Test
run: |
yarn test:tape