Bump dawidd6/action-download-artifact from 2 to 6 in /.github/workflows #5
Workflow file for this run
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: Code Checks | |
on: [push, pull_request] | |
env: | |
GRADLE_OPTS: >- | |
-Dorg.gradle.internal.launcher.welcomeMessageEnabled=false | |
GRADLE_CMD_OPTS: >- | |
-PbranchName="${{ github.ref }}" | |
--console=plain | |
--continue | |
--no-build-cache | |
--no-daemon | |
--parallel | |
jobs: | |
spotless: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
java-package: jdk | |
architecture: x64 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Check code formatting | |
run: ./gradlew ${{ env.GRADLE_CMD_OPTS }} spotlessCheck | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
java-package: jdk | |
architecture: x64 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: burrunan/gradle-cache-action@v1 | |
name: Cache .gradle | |
with: | |
# Disable caching of $HOME/.gradle/caches/*.*/generated-gradle-jars | |
save-generated-gradle-jars: false | |
# Disable caching of ~/.gradle/caches/build-cache-* | |
save-local-build-cache: false | |
# Enable caching of ~/.gradle/caches/modules-* | |
save-gradle-dependencies-cache: true | |
# Enable caching of ~/.m2/repository/ | |
save-maven-dependencies-cache: true | |
- name: Build all files | |
run: ./gradlew ${{ env.GRADLE_CMD_OPTS }} assemble compileTest | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
needs: [build] | |
steps: | |
- run: | | |
ref="${github_ref////-}" | |
echo "ref=$ref" >> $GITHUB_ENV | |
env: | |
github_ref: ${{ github.ref }} | |
shell: bash | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
java-package: jdk | |
architecture: x64 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
# This is to ensure unit tests with MariaDB4j don't fail | |
- name: Symlinks for MacOS | |
if: ${{ runner.os == 'MacOS' }} | |
run: | | |
sudo ln -s /usr/lib/libssl.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib | |
sudo ln -s /usr/lib/libcrypto.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib | |
- uses: burrunan/gradle-cache-action@v1 | |
name: Cache .gradle | |
with: | |
# Disable caching of $HOME/.gradle/caches/*.*/generated-gradle-jars | |
save-generated-gradle-jars: false | |
# Disable caching of ~/.gradle/caches/build-cache-* | |
save-local-build-cache: false | |
# Enable caching of ~/.gradle/caches/modules-* | |
save-gradle-dependencies-cache: true | |
# Enable caching of ~/.m2/repository/ | |
save-maven-dependencies-cache: true | |
- name: Run all Tests | |
id: gradle_tests | |
run: ./gradlew ${{ env.GRADLE_CMD_OPTS }} -x spotlessCheck build | |
- uses: actions/upload-artifact@v2 | |
if: success() || failure() | |
with: | |
name: ${{ env.ref }}_code-checks_${{ matrix.os }} | |
path: | | |
**/build/test-results/test/TEST-*.xml | |
**/build/reports/spotbugs/*.xml |