forked from CESNET/perun-web-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.22 KB
/
build.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
name: Build
on: [ push, pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache Eslint
uses: actions/cache@v3
with:
path: ./.eslintcache
key: eslintcache-${{github.sha}}
restore-keys: |
eslintcache-
- name: Install Dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci
- name: Run color-migration script
run: node ./color-migration.js
- name: Build
run: npm run build
- name: Run Prettier
run: npm run format:check
- name: Run ESLint
run: npm run lint