-
-
Notifications
You must be signed in to change notification settings - Fork 587
77 lines (63 loc) · 1.6 KB
/
config.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build and Configure
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- name: build
run: npx webpack --mode=production
env:
PUBLIC_PATH: '/AncientBeast/'
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: deploy
path: deploy
codeanalysis:
runs-on: ubuntu-22.04
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: /home/runner/work/AncientBeast/AncientBeast
- run: npm ci
- name: Static Code Analysis (ESLint)
run: npm run lint > eslint-report.log
- name: Static Code Analysis (ESLint)
run: cat eslint-report.log
- name: Archive ESLint Report
uses: actions/upload-artifact@v4
with:
name: eslint-report
path: eslint-report.log
test:
runs-on: ubuntu-22.04
needs: codeanalysis
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Build for testing
run: npm run build:dev
- name: Run tests
run: npm test
deploy:
runs-on: ubuntu-22.04
needs: test
steps:
- name: Deploy completed
run: echo "Deploy completed"