Skip to content

Commit

Permalink
use gradle action
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Jul 7, 2023
1 parent ac89ea3 commit a008cca
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
45 changes: 25 additions & 20 deletions .github/actions/checkout-and-build/action.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
name: checkout-and-build
runs:
using: composite
steps:
- uses: actions/[email protected]
- run: chmod +x gradlew
shell: bash
- name: restore_cache
uses: actions/[email protected]
with:
key: v1-dependencies-{{ checksum "build.gradle" }}
restore-keys: |-
v1-dependencies-{{ checksum "build.gradle" }}
v1-dependencies-
- run: "./gradlew clean build"
shell: bash
- name: save_cache
uses: actions/[email protected]
with:
path: "~/.m2"
key: v1-dependencies-{{ checksum "build.gradle" }}

jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8

- name: Setup and execute Gradle 'test' task
- uses: gradle/gradle-build-action@v2
with:
arguments: assemble
- uses: gradle/gradle-build-action@v2
with:
arguments: check jacocoTestReport --continue --console=plain
- uses: codecov/codecov-action@v3
with:
directory: ./coverage/
flags: unittests
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
steps:
- uses: actions/[email protected]
- uses: "./.github/actions/checkout-and-build"
- uses: "./.github/actions/run-tests"
# - uses: "./.github/actions/run-tests"

0 comments on commit a008cca

Please sign in to comment.