-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.54 KB
/
lint.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
63
name: Lint
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
with:
egress-policy: audit
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: ${{ matrix.node-version }}
- name: Install yarn
run: npm install -g yarn
- name: Get Yarn version
run: echo "YARN_VERSION=$(yarn --version)" >> "$GITHUB_ENV"
id: yarn-version
- name: Cache yarn dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
if: ${{ !env.ACT }}
with:
path: ./node_modules
key: yarn-cache-${{ runner.os }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Lint
run: yarn lint
all-jobs-pass:
name: All jobs pass
runs-on: ubuntu-20.04
needs:
- lint
steps:
- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
with:
egress-policy: audit
- run: echo "Great success!"