This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
62 lines (57 loc) · 1.76 KB
/
check-pull-request.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
58
59
60
61
62
name: Check Pull Request
on:
pull_request:
branches:
- master
env:
CI: true
yarn-cache-name: yarn-cache-1
yarn-cache-path: .yarn
jobs:
commit-lint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v1
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [16]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Use or update Yarn cache
uses: actions/cache@v2
with:
path: ${{ env.yarn-cache-path }}
key: ${{ matrix.os }}-${{ matrix.node }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --cache-folder=${{ env.yarn-cache-path }} install --frozen-lockfile
- run: yarn --cache-folder=${{ env.yarn-cache-path }} run lint
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [16]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Use or update Yarn cache
uses: actions/cache@v2
with:
path: ${{ env.yarn-cache-path }}
key: ${{ matrix.os }}-${{ matrix.node }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --cache-folder=${{ env.yarn-cache-path }} install --frozen-lockfile
- run: yarn --cache-folder=${{ env.yarn-cache-path }} run test