Skip to content

Commit 72ce02a

Browse files
committed
ci: add GitHub Actions workflow for automated testing
Add CI pipeline that runs on push to main, pull requests, and manual trigger. The workflow sets up the required build environment (Java 21, Python 3.12, Gradle) and executes the full test suite including: - Syncing addon source repositories - Downloading latest release fixture jars - Running Gradle tests with a 45-minute timeout - Uploading test reports and release summaries as artifacts This ensures code quality and catches regressions early in the development cycle.
1 parent cf2717a commit 72ce02a

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
name: Download Fixtures And Run Tests
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 45
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
25+
steps:
26+
- name: Check out repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Java 21
30+
uses: actions/setup-java@v4
31+
with:
32+
distribution: temurin
33+
java-version: "21"
34+
35+
- name: Set up Gradle
36+
uses: gradle/actions/setup-gradle@v4
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: "3.12"
42+
43+
- name: Ensure Gradle wrapper is executable
44+
run: chmod +x gradlew
45+
46+
- name: Sync addon source repos
47+
run: python tools/download_latest_release_jars.py --update
48+
49+
- name: Download latest release fixture jars
50+
run: ./gradlew downloadLatestReleaseJars --no-daemon
51+
52+
- name: Run test suite
53+
run: ./gradlew test --no-daemon
54+
55+
- name: Upload release summaries
56+
if: always()
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: release-summaries
60+
if-no-files-found: warn
61+
path: |
62+
ai_reference/addons/clone-summary.json
63+
fixtures/addons/jars/release-summary.json
64+
fixtures/addons/jars/release-summary.csv
65+
fixtures/addons/jars/release-summary.txt
66+
67+
- name: Upload test reports
68+
if: failure()
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: test-reports
72+
if-no-files-found: warn
73+
path: |
74+
build/reports/tests/test/**
75+
build/test-results/test/**

0 commit comments

Comments
 (0)