Skip to content

Migrate generated artifacts between jobs #279

Migrate generated artifacts between jobs

Migrate generated artifacts between jobs #279

Workflow file for this run

name: Build and Test
on:
pull_request:
push:
workflow_dispatch:
env:
SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION || 'aim42' }}
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY || 'aim42_htmlSanityCheck' }}
jobs:
build-artifacts:
uses: ./.github/workflows/build-artifacts.yml
with:
java-version: '17'
post-build:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: .
- name: 'Publish Test Results'
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: |
**/build/test-results/**/*.xml
- name: JaCoCo Test Coverage Report
uses: PavanMudigonda/[email protected]
with:
coverage_results_path: "htmlSanityCheck-gradle-plugin/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Test Matrix Workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: test-java-os-mix.yml
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Analyze with SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
./gradlew sonar -Psonar.branch.name=${BRANCH_NAME} --info --scan