Skip to content

Commit bc61531

Browse files
committed
GitHub pr test CI
1 parent 8f18c43 commit bc61531

File tree

2 files changed

+64
-4
lines changed

2 files changed

+64
-4
lines changed

.github/workflows/publish-release.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
IS_CI: true
1818
SIMBOT_LOCAL: false
1919
GRADLE_OPTS: "-Dfile.encoding=UTF-8"
20+
GRADLE_VERSION: 8.10.2
2021

2122
jobs:
2223
test:
@@ -34,7 +35,7 @@ jobs:
3435
- name: Setup Gradle
3536
uses: gradle/actions/setup-gradle@v3
3637
with:
37-
gradle-version: 8.5
38+
gradle-version: ${{ env.GRADLE_VERSION }}
3839
- run: gradle assemble build -s
3940

4041
publish:
@@ -53,7 +54,7 @@ jobs:
5354
- name: Test and publish to sonatype
5455
uses: gradle/actions/setup-gradle@v3
5556
with:
56-
gradle-version: 8.5
57+
gradle-version: ${{ env.GRADLE_VERSION }}
5758
arguments:
5859
publishToSonatype
5960
closeAndReleaseStagingRepositories
@@ -86,7 +87,7 @@ jobs:
8687
- name: Publish to gradle
8788
uses: gradle/actions/setup-gradle@v3
8889
with:
89-
gradle-version: 8.5
90+
gradle-version: ${{ env.GRADLE_VERSION }}
9091
arguments: |
9192
build
9293
publishPlugins
@@ -117,7 +118,7 @@ jobs:
117118
- name: Create changelog
118119
uses: gradle/actions/setup-gradle@v3
119120
with:
120-
gradle-version: 8.5
121+
gradle-version: ${{ env.GRADLE_VERSION }}
121122
arguments: createChangelog
122123

123124
# https://github.com/softprops/action-gh-release

.github/workflows/test-branch.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test Branch
2+
on:
3+
pull_request:
4+
branches:
5+
- 'dev'
6+
paths:
7+
- '**.java'
8+
- '**.kt'
9+
- '**.kts'
10+
- '*/src/*/kotlin/**'
11+
- '*/src/*/java/**'
12+
- '*/src/*/resource/**'
13+
- 'gradle/**'
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
env:
20+
IS_CI: true
21+
GRADLE_OPTS: "-Dfile.encoding=UTF-8"
22+
GRADLE_VERSION: 8.10.2
23+
24+
jobs:
25+
build-test:
26+
name: Build and test
27+
strategy:
28+
matrix:
29+
os: [ macos-latest, windows-latest, ubuntu-latest ]
30+
runs-on: ${{ matrix.os }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-java@v4
34+
with:
35+
distribution: 'zulu'
36+
java-version: 11
37+
cache: 'gradle'
38+
39+
- name: Run All Tests
40+
uses: gradle/actions/setup-gradle@v3
41+
with:
42+
gradle-version: ${{ env.GRADLE_VERSION }}
43+
arguments: |
44+
assemble
45+
build
46+
allTests
47+
--info
48+
--warning-mode all
49+
# --build-cache
50+
# -Porg.gradle.daemon=false
51+
# -Porg.gradle.jvmargs="-Xmx4g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
52+
53+
- name: Upload test reports
54+
uses: actions/upload-artifact@v4
55+
if: ${{ always() }}
56+
with:
57+
name: test-reports-${{ matrix.os }}
58+
path: '**/build/reports/tests'
59+
retention-days: 7

0 commit comments

Comments
 (0)