forked from learningequality/kolibri-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 874 Bytes
/
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
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 10.x
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
- run: yarn --frozen-lockfile
- name: Pre-generate docs
run: yarn run pregenerate
- name: Run linter
run: yarn run lint
- name: Check for modified files
run: |
if [[ `git status --porcelain --untracked-files=no` ]]; then
echo "Tracked files were modified by 'yarn run pregenerate'"
exit 1
else
exit 0
fi