-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 901 Bytes
/
test.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
name: Gradle tests using matrix
on:
pull_request:
branches: [ "main" ]
jobs:
changes:
permissions:
pull-requests: read
uses: ./.github/workflows/check-changes.yml
test:
needs: changes
if: needs.changes.outputs.packages != '[]'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
# test only changed projects
projects: ${{ fromJSON(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
# will test all or some of the projects individually but still individually
- name: tests individually
run: gradle ${{ matrix.projects }}:clean ${{ matrix.projects }}:test