-
Notifications
You must be signed in to change notification settings - Fork 110
79 lines (74 loc) · 2.59 KB
/
main.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
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
name: build
permissions: read-all
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.3.0
with:
distribution: 'corretto'
java-version: 8
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808
with:
validate-wrappers: true
- run: ./gradlew build
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
files: build/reports/jacoco/test/jacocoTestReport.xml
- uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
with:
name: spotbugs-report
path: build/reports/spotbugs/
- name: ion-java-cli sanity check
run: ./ion-test-driver-run version
verify-jre-compatibility:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17, 21]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.3.0
with:
distribution: 'corretto'
java-version: |
8
${{matrix.java}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808
with:
cache-read-only: true
validate-wrappers: true
- run: ./gradlew minifyTest${{matrix.java}}
check-version:
# Ensures that the version is not a release (i.e. -SNAPSHOT) or if it is a release version,
# ensures that the version is a later version number than the existing releases.
# See limitations at:
# https://github.com/amazon-ion/ion-java/blob/master/.github/actions/inspect-version/action.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.6.0
- name: Get Project Version
run: |
echo "PROJECT_VERSION=v$(<project.version)" >> $GITHUB_ENV
- uses: ./.github/actions/inspect-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: amazon-ion/ion-java
project_version: ${{ env.PROJECT_VERSION }}
fail_if_invalid: true