forked from gridsome/gridsome
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.08 KB
/
test.yml
File metadata and controls
44 lines (42 loc) · 1.08 KB
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
name: Test
on:
push:
branches:
- master
paths:
- 'yarn.lock'
- 'jest.config.js'
- 'gridsome/**/*.js'
- 'packages/**/*.js'
- '.github/workflows/test.yml'
pull_request:
branches:
- master
paths:
- 'yarn.lock'
- 'jest.config.js'
- 'gridsome/**/*.js'
- 'packages/**/*.js'
- '.github/workflows/test.yml'
jobs:
test:
name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: ['12', '14', '16']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ runner.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run tests
run: yarn test:unit --ci