Skip to content

Switch to new Shadow Jar plugin (#389) #590

Switch to new Shadow Jar plugin (#389)

Switch to new Shadow Jar plugin (#389) #590

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: JavaCI-PR
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths-ignore:
- 'README.md'
- '**/README.md'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'pull_request_template.md'
- '.lift/.toml'
- '**/.lift/.toml'
- 'SECURITY.md'
- 'LICENSE'
- '.github/ISSUE_TEMPLATE/**'
- '.github/assets/**'
- '.github/workflows/**'
- '!.github/workflows/gradle-ci.yml'
- '.github/pr-labeler.yml'
- 'renovate.json'
- '.whitesource'
- 'config/ossindex/exclusions.txt'
permissions: read-all
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
# Set up build environment
- name: Prepare git
if: ${{ matrix.os != 'ubuntu-latest' }}
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: temurin
java-version: 17
- name: Set up Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
with:
cache-disabled: true
- name: Build with Gradle (if Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ./gradlew printVersion build -Pci
- name: Build with Gradle (if Windows)
if: ${{ matrix.os != 'ubuntu-latest' }}
run: ./gradlew printVersion build -x :file-barj-core:jacocoTestCoverageVerification -Pci
- name: Upload Test reports - Core
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-report-file-barj-core-${{ matrix.os }}
path: |
file-barj-core/build/reports/tests/test
file-barj-core/build/reports/abort-mission/abort-mission-report.html
retention-days: 5
- name: Upload Test reports - Job
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-report-file-barj-job-${{ matrix.os }}
path: |
file-barj-job/build/reports/tests/test
file-barj-job/build/reports/abort-mission/abort-mission-report.html
retention-days: 5
- name: Upload Test reports - Stream IO
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: test-report-file-barj-stream-io-${{ matrix.os }}
path: |
file-barj-stream-io/build/reports/tests/test
file-barj-stream-io/build/reports/abort-mission/abort-mission-report.html
retention-days: 5
- name: Upload coverage to Codecov - Core (if Ubuntu)
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'nagyesta' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./file-barj-core/build/reports/jacoco/report.xml
flags: core
- name: Upload coverage to Codecov - Job (if Ubuntu)
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'nagyesta' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./file-barj-job/build/reports/jacoco/report.xml
flags: job
- name: Upload coverage to Codecov - Stream IO (if Ubuntu)
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
if: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'nagyesta' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./file-barj-stream-io/build/reports/jacoco/report.xml
flags: stream