-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (32 loc) · 895 Bytes
/
test.yml
File metadata and controls
41 lines (32 loc) · 895 Bytes
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
name: Test
on:
push:
workflow_dispatch:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [12, 14]
os: [ubuntu-18.04, ubuntu-20.04]
name: Node ${{ matrix.node }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path
id: yarn_cache
run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn_cache.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn
- name: Tests
run: yarn run test