-
Notifications
You must be signed in to change notification settings - Fork 2.4k
54 lines (42 loc) · 1.3 KB
/
build.yml
File metadata and controls
54 lines (42 loc) · 1.3 KB
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: SwaggerEditor build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Use Node.js 24
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint commit message
if: github.ref != 'refs/heads/main' && github.actor != 'dependabot[bot]'
run: git log -1 --pretty=format:"%s" | npx commitlint
- name: Lint code
run: npm run lint
- name: Unit tests
run: npm test
env:
CI: true
- name: Build App artifacts
run: npm run build:app
- name: Upload build artifacts
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v6
with:
name: build
path: ./build
- name: E2E Tests
run: npm run cy:ci