forked from ParabolInc/parabol
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.31 KB
/
style-check.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
name: Style Check
on:
push:
branches-ignore:
- "release-please--**"
- "release/v**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
style-check:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: package.json
# Caching yarn dir & running yarn install is too slow
# Instead, we aggressively cache node_modules below to avoid calling install
- name: Setup environment variables
run: |
NODE_VERSION=$(jq -r -j '.engines.node|ltrimstr("^")' package.json)
echo NODE_VERSION=$NODE_VERSION >> $GITHUB_ENV
echo NODE_VERSION=$NODE_VERSION
- name: Get cached node modules
id: cache
uses: actions/cache@v3
with:
path: |
**/node_modules
key: node_modules-${{ runner.arch }}-${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }}
- name: Install node_modules
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Check Code Quality
run: yarn codecheck