-
Notifications
You must be signed in to change notification settings - Fork 2.1k
58 lines (56 loc) · 2.17 KB
/
spring.yml
File metadata and controls
58 lines (56 loc) · 2.17 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
# This workflow runs Spring module tests across multiple JVM versions
name: spring
on:
workflow_dispatch: {}
jobs:
spring-tests:
name: Spring Tests on Java ${{ matrix.java }}
strategy:
matrix:
java: [ 17, 21, 25, 26 ]
runs-on: ubuntu-latest
env:
BAZELISK_SKIP_VERSION_CHECK: "1"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Install Bazelisk
run: |
mkdir -p "$HOME/.local/bin"
curl -fsSL \
https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-amd64 \
-o "$HOME/.local/bin/bazel"
chmod +x "$HOME/.local/bin/bazel"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Restore Bazel repository cache (cross-OS)
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.cache/bazel/cache/repos/v1
key: bazel-repos-${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }}
restore-keys: |
bazel-repos-${{ matrix.java }}-
bazel-repos-
enableCrossOsArchive: true
- name: Restore Bazel disk cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.cache/bazel-disk-cache
key: bazel-${{ runner.os }}-java${{ matrix.java }}-${{ hashFiles('MODULE.bazel', '.bazelversion', 'maven_install.json') }}
restore-keys: |
bazel-${{ runner.os }}-java${{ matrix.java }}-
bazel-${{ runner.os }}-
- name: Pin Maven dependencies
run: REPIN=1 bazel run @maven//:pin
- name: Build Spring integrations with Bazel
run: >-
bazel build --config=ci
//spring:client-java-spring-integration
//spring-aot:client-java-spring-aot-integration
- name: Test Spring integrations with Bazel
run: >-
bazel test --config=ci
//spring:tests