-
Notifications
You must be signed in to change notification settings - Fork 6
103 lines (85 loc) · 2.06 KB
/
Copy pathfrontend_ci.yaml
File metadata and controls
103 lines (85 loc) · 2.06 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
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
name: Frontend - CI
on:
push:
branches: ["main"]
paths:
- ".github/workflows/frontend_ci.yaml"
- "*"
- "frontend/**"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/frontend_ci.yaml"
- "*"
- "frontend/**"
jobs:
commitlint:
name: Commitlint
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install
uses: ./.github/composite-actions/install
- name: Run commitlint check
run: npx commitlint -f ${{ github.event.pull_request.base.sha }}
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: ./.github/composite-actions/install
- name: Lint
run: npm run lint
- name: Type check
run: npm run typecheck
if: always()
prettier:
name: Format
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: ./.github/composite-actions/install
- name: Format check
run: npm run format:check
deadcode:
name: Find deadcode
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: ./.github/composite-actions/install
- name: Find deadcode
run: npm run knip
build:
name: Test build
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: ./.github/composite-actions/install
- name: Build
run: npm run build
env:
USOS_CONSUMER_KEY: hello
USOS_CONSUMER_SECRET: jello
NEXT_PUBLIC_API_URL: http://localhost:3333