-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (41 loc) · 1.25 KB
/
test.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
name: Tests
env:
CI: true
NODE_VERSION: 16.x
on:
- push
jobs:
prepare:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"
test:
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Clone repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: "${{ env.NODE_VERSION }}"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install node modules
run: npm ci
- name: Build emma.css file
run: npm run build
- name: Run test
run: npm t