-
-
Notifications
You must be signed in to change notification settings - Fork 3
122 lines (113 loc) · 3.39 KB
/
front-end.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Front-end"
# ECMAScript version: 2018
# Node.js version: 18.12
# Yarn version: 1
on:
pull_request: null
push:
branches:
- "master"
# Add [skip ci] to commit message to skip CI.
permissions:
contents: "read"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
js_syntax_errors:
name: "𝟏 JavaScript Syntax Errors"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3"
-
name: "Set up Node.js"
uses: "actions/setup-node@v3"
with:
node-version: "18"
check-latest: true
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Check JavaScript files for syntax errors"
run: |
git ls-files --cached -z -- 'resources/js/*.js' \
| xargs --null -- yarn run acorn --ecma2018 --module --silent
scss_coding_standards:
name: "𝟐 Sassy CSS Coding Standards"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3"
-
name: "Set up Node.js"
uses: "actions/setup-node@v3"
with:
node-version: "18"
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Detect coding standards violations"
run: "yarn run sass:lint --formatter github"
build:
name: "𝟑 Build"
needs:
- "js_syntax_errors"
- "scss_coding_standards"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3"
-
name: "Set up Node.js"
uses: "actions/setup-node@v3"
with:
node-version: "18"
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install production dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Build front-end"
run: "yarn run prod:build"
-
name: "Check differences to repository"
run: "git diff --exit-code"
svg:
name: "𝟓 SVG files"
runs-on: "ubuntu-22.04"
timeout-minutes: 1
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3"
-
name: "Validate SVG files"
uses: "szepeviktor/[email protected]"
with:
svg_path: "public/**/*.svg"
-
name: "Validate GitHub files"
uses: "szepeviktor/[email protected]"
with:
svg_path: ".github/**/*.svg"