-
Notifications
You must be signed in to change notification settings - Fork 34
56 lines (53 loc) · 1.26 KB
/
build-frontend.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
51
52
53
54
55
56
name: Build FrontEnd
on:
pull_request:
branches:
- master
paths:
- 'frontend/**'
push:
branches:
- master
paths:
- 'frontend/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
node-version: [14.x]
name: Node ${{ matrix.java }}
env:
OS: ${{ matrix.os }}
NODE_VERSION: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install
working-directory: ./frontend
run: npm ci
- name: Build
working-directory: ./frontend
run: npm run build --if-present
- name: Test
working-directory: ./frontend
run: npm test
savepr:
runs-on: ubuntu-latest
name: Save PR number if running on PR by dependabot
if: github.actor == 'dependabot[bot]'
steps:
- name: Create Directory and save issue
run: |
mkdir -p ./pr
echo ${{ github.event.number }}
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@v2
name: Updload artifact
with:
name: pr
path: pr/