Repository navigation
149 lines (127 loc) · 4.23 KB
/
Copy pathpr-checks.yml
File metadata and controls
149 lines (127 loc) · 4.23 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: PR Checks
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
contents: read
jobs:
pr-title-check:
name: PR Title Format Check
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check PR title format
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
requireScope: false
subjectPattern: ^[A-Z].+$
subjectPatternError: |
The subject "{subject}" doesn't match the pattern "^[A-Z].+$".
Examples:
- feat: Add Python package manager integration
- fix: Resolve process pool timeout handling
- refactor: Extract subprocess communication protocol
- docs: Update installation instructions
size-label:
name: Add Size Label
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Add size label
uses: codelytv/pr-size-labeler@f2aafc4d8735009c6de18acefe15eecbfbfae56f # v1.9.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/XS'
xs_max_size: '10'
s_label: 'size/S'
s_max_size: '100'
m_label: 'size/M'
m_max_size: '500'
l_label: 'size/L'
l_max_size: '1000'
xl_label: 'size/XL'
fail_if_xl: 'false'
test-coverage-comment:
name: Comment Test Coverage
runs-on: ubuntu-latest
needs: [pr-title-check]
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: ./web-ui/package-lock.json
- name: Install dependencies
working-directory: ./web-ui
run: npm ci
- name: Run tests with coverage
working-directory: ./web-ui
run: npm run test:coverage
- name: Coverage Comment
uses: romeovs/lcov-reporter-action@dda1c9b1fa1622b225e9acd87a248751dbcc6ada # v0.3.1
with:
lcov-file: ./web-ui/coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
gradle-check:
name: Gradle Check (tests + JaCoCo + SpotBugs + Checkstyle)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK 17
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Node.js (for webpack frontend assets)
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: ./web-ui/package-lock.json
- name: Install frontend dependencies
working-directory: ./web-ui
run: npm ci
- name: Cache Gradle dependencies
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run gradle check (tests, JaCoCo verification, SpotBugs, Checkstyle)
run: ./gradlew check --no-daemon --stacktrace