Skip to content

Commit

Permalink
Bump actions in CI workflow, allow Gradle cache for 'neo' branch (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen authored Jan 17, 2025
1 parent 0d1a79f commit 8a588e7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ jobs:
main_jdk: 8

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'zulu'

- name: Set up Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v4
with:
# Only write to the cache for builds on the specific branches. (Default is 'main' only.)
# Builds on other branches will only read existing entries from the cache.
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
cache-read-only: ${{ github.ref != 'refs/heads/develop' && github.ref != 'ref/heads/neo' }}

- name: Set up GraphViz
uses: ts-graphviz/setup-graphviz@v2
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
run: ./gradlew :jacodb-ets:test --scan

- name: Build and run tests
run: ./gradlew build --stacktrace --scan
run: ./gradlew build --scan

- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand Down Expand Up @@ -124,23 +124,23 @@ jobs:
name: Run lifecycle tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'zulu'

- name: Set up Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v4
with:
# Only write to the cache for builds on the specific branches. (Default is 'main' only.)
# Builds on other branches will only read existing entries from the cache.
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
cache-read-only: ${{ github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/neo' }}

- name: Build and run lifecycle tests
run: ./gradlew lifecycleTest --stacktrace --scan
run: ./gradlew lifecycleTest --scan

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit 8a588e7

Please sign in to comment.