Add LOG_LEVEL
env var to control default miner log level without ed…
#1580
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: Build and deploy project | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
tags: | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
jobs: | |
dependency-submission: | |
name: Dependencies submission | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ vars.JAVA_VERSION }} | |
- name: Generate and submit dependency graph | |
uses: gradle/actions/[email protected] | |
continue-on-error: true | |
build: | |
name: Build project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ vars.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
- name: Build project | |
run: | | |
./gradlew \ | |
assemble \ | |
--scan | |
- name: Upload miner jar file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: miner-jar | |
path: | | |
miner/build/libs/miner-shaded.jar | |
if-no-files-found: error | |
retention-days: 14 | |
- name: Upload viewer jar file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: viewer-jar | |
path: | | |
viewer/build/libs/viewer-*.jar | |
if-no-files-found: error | |
retention-days: 14 | |
test-miner: | |
name: Run miner tests | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ vars.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
- name: Run tests | |
run: | | |
./gradlew \ | |
:miner:test \ | |
--scan | |
- name: Generate JaCoCo report | |
if: always() | |
run: | | |
./gradlew \ | |
:miner:jacocoTestReport | |
- name: Publish Test Report | |
uses: mikepenz/[email protected] | |
if: always() | |
with: | |
report_paths: 'miner/build/test-results/test/*.xml' | |
- name: Publish coverage on CodeCov | |
uses: codecov/[email protected] | |
if: always() | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: miner/build/reports/jacoco/test/jacocoTestReport.xml | |
flags: unittests-miner | |
name: codecov-github-actions | |
- name: Upload JUnit reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: junit-test-results-miner | |
path: | | |
miner/build/test-results/test/*.xml | |
miner/build/reports/tests/tests | |
if-no-files-found: error | |
retention-days: 14 | |
- name: Upload JaCoCo reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: jacoco-test-results-miner | |
path: | | |
miner/build/reports/jacoco/test/*.xml | |
miner/build/reports/jacoco | |
if-no-files-found: error | |
retention-days: 14 | |
test-viewer: | |
name: Run viewer tests | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
checks: write | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ vars.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
- name: Run tests | |
run: | | |
./gradlew \ | |
:viewer:test \ | |
--scan | |
- name: Generate JaCoCo report | |
if: always() | |
run: | | |
./gradlew \ | |
:viewer:jacocoTestReport | |
- name: Publish Test Report | |
uses: mikepenz/[email protected] | |
if: always() | |
with: | |
report_paths: 'viewer/build/test-results/test/*.xml' | |
- name: Publish coverage on CodeCov | |
uses: codecov/[email protected] | |
if: always() | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: viewer/build/reports/jacoco/test/jacocoTestReport.xml | |
flags: unittests-viewer | |
name: codecov-github-actions | |
- name: Upload JUnit reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: junit-test-results-viewer | |
path: | | |
viewer/build/test-results/test/*.xml | |
viewer/build/reports/tests/tests | |
if-no-files-found: error | |
retention-days: 14 | |
- name: Upload JaCoCo reports | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: jacoco-test-results-viewer | |
path: | | |
viewer/build/reports/jacoco/test/*.xml | |
viewer/build/reports/jacoco | |
if-no-files-found: error | |
retention-days: 14 | |
publish-miner: | |
name: Publish Miner on DockerHub | |
runs-on: ubuntu-latest | |
needs: | |
- test-miner | |
- test-viewer | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' | |
concurrency: miner_docker | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ vars.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
- name: Calculate miner image name | |
id: miner-image-name | |
run: echo "IMAGE_NAME=${{ vars.DOCKER_IMAGE_MINER }}:${GITHUB_REF##*/}" >> "$GITHUB_OUTPUT" | |
- name: Push branch/tag on Docker Hub | |
run: | | |
./gradlew \ | |
:miner:jib \ | |
-Djib.to.auth.username=${{ secrets.DOCKER_USERNAME }} \ | |
-Djib.to.auth.password=${{ secrets.DOCKER_TOKEN }} \ | |
-Djib.to.image=${{ steps.miner-image-name.outputs.IMAGE_NAME }} | |
publish-viewer: | |
name: Publish Viewer on DockerHub | |
runs-on: ubuntu-latest | |
needs: | |
- test-miner | |
- test-viewer | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' | |
concurrency: viewer_docker | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ vars.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
- name: Calculate viewer image name | |
id: viewer-image-name | |
run: echo "IMAGE_NAME=${{ vars.DOCKER_IMAGE_VIEWER }}:${GITHUB_REF##*/}" >> "$GITHUB_OUTPUT" | |
- name: Push branch/tag on Docker Hub | |
run: | | |
./gradlew \ | |
:viewer:jib \ | |
-Djib.to.auth.username=${{ secrets.DOCKER_USERNAME }} \ | |
-Djib.to.auth.password=${{ secrets.DOCKER_TOKEN }} \ | |
-Djib.to.image=${{ steps.viewer-image-name.outputs.IMAGE_NAME }} |