Skip to content

Commit

Permalink
Build the source before uploading the report
Browse files Browse the repository at this point in the history
  • Loading branch information
Maduranga Siriwardena committed Sep 13, 2024
1 parent db67e3d commit fe37590
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 18 deletions.
60 changes: 53 additions & 7 deletions .github/workflows/coverage-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,41 @@ on:
workflow_dispatch:

jobs:
oidc-conformance-report:
build-source:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Adopt JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: "adopt"

- name: Build with Maven
run: |
mvn clean install -U -B -Dmaven.test.skip=true
- name: Cache source code
uses: actions/cache@v4
with:
path: .
key: ${{ runner.os }}-source-${{ github.sha }}

oidc-conformance-report:
needs: build-source
runs-on: ubuntu-latest

steps:
- name: Restore source code
uses: actions/cache@v4
with:
path: .
key: ${{ runner.os }}-source-${{ github.sha }}
restore-keys: |
${{ runner.os }}-source-
- name: Get the latest artifact URL for OIDC
id: get-artifact-url-oidc
Expand Down Expand Up @@ -47,7 +76,8 @@ jobs:
${{ steps.get-artifact-url-oidc.outputs.artifact-url }}
- name: Unzip artifact for OIDC
run: unzip artifact-oidc.zip -d ./artifacts-oidc
run: |
unzip artifact-oidc.zip -d ./artifacts-oidc
- name: Upload coverage reports to Codecov for OIDC
uses: codecov/codecov-action@v4
Expand All @@ -58,11 +88,17 @@ jobs:
disable_search: true

fapi-conformance-report:
needs: build-source
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Restore source code
uses: actions/cache@v4
with:
path: .
key: ${{ runner.os }}-source-${{ github.sha }}
restore-keys: |
${{ runner.os }}-source-
- name: Get the latest artifact URL for FAPI
id: get-artifact-url-fapi
Expand Down Expand Up @@ -100,7 +136,8 @@ jobs:
${{ steps.get-artifact-url-fapi.outputs.artifact-url }}
- name: Unzip artifact for FAPI
run: unzip artifact-fapi.zip -d ./artifacts-fapi
run: |
unzip artifact-fapi.zip -d ./artifacts-fapi
- name: Upload coverage reports to Codecov for FAPI
uses: codecov/codecov-action@v4
Expand All @@ -111,9 +148,18 @@ jobs:
disable_search: true

integration-test-report:
needs: build-source
runs-on: ubuntu-latest

steps:
- name: Restore source code
uses: actions/cache@v4
with:
path: .
key: ${{ runner.os }}-source-${{ github.sha }}
restore-keys: |
${{ runner.os }}-source-
- name: Download integration Jacoco XML report
run: |
mkdir artifacts-integration
Expand All @@ -125,4 +171,4 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./artifacts-integration/jacoco.xml
flags: integration
disable_search: true
disable_search: true
12 changes: 1 addition & 11 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@ codecov:
require_ci_to_pass: yes
notify:
wait_for_ci: yes
#coverage:
# status:
# project:
# default:
# enabled: yes
# threshold: null
# target: auto
# patch:
# default:
# target: 80%
# threshold: 40%
max_report_age: false

coverage:
status:
Expand Down

0 comments on commit fe37590

Please sign in to comment.