-
Notifications
You must be signed in to change notification settings - Fork 87
54 lines (45 loc) · 1.19 KB
/
frontend_test.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
name: Frontend test
on:
push:
branches:
- main
paths:
- frontend/**
- .github/actions/frontend_test/**
- .github/workflows/frontend_test.yaml
pull_request:
branches:
- main
paths:
- frontend/**
- .github/actions/frontend_test/**
- .github/workflows/frontend_test.yaml
workflow_dispatch:
jobs:
frontend-test:
name: Frontend module test
runs-on: ubuntu-latest
steps:
- name: Setup timezone
run: sudo timedatectl set-timezone "Asia/Shanghai"
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Node.js packages
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run frontend tests
uses: ./.github/actions/frontend_test
with:
working-dir: ./frontend
## This step allow you to debug via SSH
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# sudo: true