-
Notifications
You must be signed in to change notification settings - Fork 562
61 lines (52 loc) · 1.44 KB
/
lint_javascript.yaml
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
name: lint_javascript
on:
push:
branches:
- main
pull_request:
paths:
- .babelrc
- .mocharc.js
- app/**.js
- bulk-decaffeinate.config.js
- cli/**.js
- config/**.js
- desktop/**.js
- gulp/**.js
- gulpfile.babel.js
#- packages/**.js
- scripts/**.js
- server/**.js
- test/**.js
- worker/**.js
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
- name: install system dependencies
run: sudo apt-get install -y libpng-dev
- name: install node.js
uses: actions/setup-node@v3
with:
node-version: 18
# Caching node_modules saves 50s on builds which don't modify dependencies.
# Compared to yarn caching, it saves an additional 27 seconds.
- name: cache node_modules
uses: actions/cache@v3
with:
path: /home/runner/work/duelyst/duelyst/node_modules
key: node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-
- name: redirect git ssh to https
run: |
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
- name: install node dependencies
run: yarn install --dev
- name: compile typescript dependencies
run: yarn tsc:chroma-js
- name: lint javascript code
run: yarn lint:js:all