-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.39 KB
/
test.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
name: Test
on:
pull_request:
branches:
- 'main'
- '!renovate/**'
push:
branches:
- 'main'
- 'renovate/**'
jobs:
pre:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: false
skip_after_successful_duplicate: true
concurrent_skipping: same_content_newer
paths_ignore: '["**/*.md", "**/docs/**"]'
test:
needs: pre
if: ${{ needs.pre.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16]
steps:
- uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: true
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Show environment information
run: |
echo "node: $(node -v)"
echo "yarn: $(yarn -v)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: .yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn typecheck
if: ${{ matrix.node == 16 }}
- run: yarn lint
if: ${{ matrix.node == 16 }}