-
Notifications
You must be signed in to change notification settings - Fork 22
34 lines (32 loc) · 1000 Bytes
/
ci.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
name: Test all the things
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
name: Java ${{ matrix.java }}
strategy:
matrix:
java: [8, 11, 17, 21]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
cache: 'gradle'
- name: Test
run: |
# Conditionally run different commands based on the Java version
if [[ "${{ matrix.java }}" == "8" ]]; then
./gradlew wrapper --gradle-version=8.4-rc-1 :agent:spec && ./gradlew wrapper --gradle-version=8.4-rc-1 agent:publishToMavenLocal
else
./travis-test.sh
fi