Merge pull request #22 from ing-bank/fix/corda-repos #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PRs and merges to master | |
env: | |
ZINC_VERSION: "v0.1.5-ING-13" | |
on: | |
push: | |
branches: [ master, main ] | |
paths-ignore: | |
- 'docs/**' | |
- '*.md' | |
- 'LICENSE' | |
- 'TRADEMARK' | |
- 'CONTRIBUTORS' | |
- '.ci/**' | |
- '.gitignore' | |
pull_request: | |
branches: [ master, main ] | |
paths-ignore: | |
- 'docs/**' | |
- '*.md' | |
- 'LICENSE' | |
- 'TRADEMARK' | |
- 'CONTRIBUTORS' | |
- '.ci/**' | |
- '.gitignore' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8.0.232 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: zulu | |
java-version: 8.0.232 | |
java-package: jdk | |
# Build cache | |
- name: Cache Gradle Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }} | |
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Cache gradle wrapper | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Fetch Zinc ING Fork | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: "mvdbos/zinc" | |
version: "tags/${{ env.ZINC_VERSION }}" | |
file: "zinc-linux.tar.gz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Zinc ING Fork and add to $PATH | |
run: | | |
tar xvzf zinc-linux.tar.gz | |
echo "$GITHUB_WORKSPACE/zinc-linux/" >> $GITHUB_PATH | |
- name: Build with Gradle | |
run: ./gradlew clean cleanTest check test testReport jacocoRootReport checkLicense spotBugsMain --no-build-cache --rerun-tasks --no-daemon --no-parallel --stacktrace --info | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sample ZKDapp - Build with Gradle | |
run: ./gradlew clean cleanTest build --no-build-cache --rerun-tasks --no-daemon --no-parallel --stacktrace --info | |
working-directory: sample-zkdapp | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload JUnit test report | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Junit Test Report | |
path: build/reports/tests/test | |
- name: Upload JaCoCo report | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: JaCoCo Report | |
path: build/reports/jacoco/aggregate/html | |
- name: Upload detekt report | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Detekt Report | |
path: build/reports/detekt |