|
| 1 | +name: CI Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, 4.0.x, 3.5.x, 'issue/**' ] |
| 6 | + |
| 7 | +permissions: read-all |
| 8 | + |
| 9 | +jobs: |
| 10 | + build-java: |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + java-version: [ base, main ] |
| 14 | + redis-version: [ 6, 7, 8, valkey-8 ] |
| 15 | + name: Build project |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v6 |
| 19 | + - name: Setup Java and Maven |
| 20 | + uses: spring-projects/spring-data-release/actions/setup-maven@main |
| 21 | + with: |
| 22 | + java-version: ${{ matrix.java-version }} |
| 23 | + develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}' |
| 24 | + - name: Determine Redis Version |
| 25 | + id: determine-redis-version |
| 26 | + shell: bash |
| 27 | + run: | |
| 28 | + REDIS_VERSION=$(echo ${CONFIG_JSON} | jq -r '.database.redis["${{ matrix.redis-version }}"]') |
| 29 | + echo "$REDIS_VERSION" |
| 30 | + echo "REDIS_VERSION=$REDIS_VERSION" >> $GITHUB_OUTPUT |
| 31 | + - name: Cache Redis |
| 32 | + uses: actions/cache@v5.0.2 |
| 33 | + with: |
| 34 | + path: | |
| 35 | + work/**/bin |
| 36 | + !work/*.conf |
| 37 | + !work/*.pid |
| 38 | + key: ${{ runner.os }}-redis-${{ matrix.redis-version }}-${{ steps.determine-redis-version.outputs.REDIS_VERSION }}-${{ hashFiles('Makefile') }} |
| 39 | + - name: Install and Start Redis |
| 40 | + if: ${{ !contains(matrix.redis-version, 'valkey') }} |
| 41 | + env: |
| 42 | + VERSION: ${{ steps.determine-redis-version.outputs.REDIS_VERSION }} |
| 43 | + PROJECT: redis |
| 44 | + GH_ORG: redis |
| 45 | + run: make start |
| 46 | + - name: Install and Start Valkey |
| 47 | + if: ${{ contains(matrix.redis-version, 'valkey') }} |
| 48 | + env: |
| 49 | + VERSION: ${{ steps.determine-redis-version.outputs.REDIS_VERSION }} |
| 50 | + PROJECT: valkey |
| 51 | + GH_ORG: valkey-io |
| 52 | + run: make start |
| 53 | + - name: Build |
| 54 | + run: ./mvnw -Dsort -B -U -DrunLongTests=true clean dependency:list verify |
| 55 | + - name: Test Summary |
| 56 | + uses: test-summary/action@v2.2 |
| 57 | + with: |
| 58 | + paths: '**/TEST-*.xml' |
| 59 | + if: always() |
0 commit comments