-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.16 KB
/
verify-pr.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
name: validate-pr
on:
pull_request:
types: [edited, opened, reopened, synchronize]
defaults:
run:
shell: bash
jobs:
validate_pr_title:
runs-on: ubuntu-latest
steps:
- name: Validate PR Title
if: github.base_ref == 'dev'
run: |
title="${{ github.event.pull_request.title }}"
if [[ "$title" =~ ^(FIX|CHANGE|NEW)([[:space:]]*\([^()]+\))?[[:space:]]*:?[[:space:]]*@W-[[:digit:]]{8,9}@[[:space:]]*.+ ]]; then
echo "Valid PR title: '$title'"
else
echo "::error::Invalid PR title: '$title'. Please following the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary"
exit 1
fi
run_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: npm install
- run: npm run all