Repository navigation
159 lines (130 loc) · 3.9 KB
/
Copy pathpull-requests.yml
File metadata and controls
159 lines (130 loc) · 3.9 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
150
151
152
153
154
155
156
157
158
159
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
test:
description: 'Run test suite'
required: false
default: 'true'
lint:
description: 'Run lint check'
required: false
default: 'true'
docs:
description: 'Run documentation check'
required: false
default: 'true'
corpus:
description: 'Run corpus check'
required: false
default: 'true'
java:
description: 'Run Java build and test'
required: false
default: 'true'
jobs:
java:
name: Java Build and Test
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event.inputs.java == 'true' || github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build
run: ./gradlew build --no-daemon
working-directory: templates/root
timeout-minutes: 15
- name: Report Results
run: |
echo "✅ Java build and test completed successfully"
echo "Run './gradlew test' in templates/root locally to see detailed results"
build:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build
timeout-minutes: 10
- name: Run Test Suite
run: npm test
timeout-minutes: 10
- name: Report Spec Count
run: |
echo "✅ Build completed successfully"
echo "Run 'npm test' locally to see detailed results"
markdown:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install Documentation Tools
run: npm install -g markdownlint-cli2 linkinator
- name: Verify Markdown
run: bash Documentation/verify-markdown.sh
timeout-minutes: 5
if: inputs.docs == 'true' || github.event_name != 'workflow_dispatch'
check:
name: Corpus Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Run Corpus Check
run: node scripts/sync-corpus-to-templates.mjs --check
timeout-minutes: 5
if: inputs.corpus == 'true' || github.event_name != 'workflow_dispatch'
no-release:
name: No-Release Intent
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'no-release')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for Documentation Changes
run: |
echo "✅ PR marked as no-release"
echo "Checking documentation changes..."
# Get changed files
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
# Check if only documentation files changed
if echo "$changed_files" | grep -qE '^(Documentation/|README\.md|\.github/workflows/|\.gitignore)$'; then
echo "✅ Only documentation/CI changes detected"
else
echo "⚠️ Non-documentation files changed:"
echo "$changed_files"
fi