Skip to content

ci: updated check changes ci #30

ci: updated check changes ci

ci: updated check changes ci #30

Workflow file for this run

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
- name: tests individually
if: ${{ ! contains(matrix.projects, 'buildSrc') }}
run: gradle ${{ matrix.projects }}:clean ${{ matrix.projects }}:test
- name: test all
if: ${{ contains(matrix.projects, 'buildSrc') }}
run: gradle clean test