Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect all coverage data at once #3537

Merged
merged 13 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run-bwc-suite/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
-Dbwc.version.next=${{ steps.build-next.outputs.built-version }} -i
build-root-directory: bwc-test

- uses: actions/upload-artifact@v3
- uses: alehechka/upload-tartifact@v2
if: always()
with:
name: ${{ inputs.report-artifact-name }}
Expand Down
63 changes: 47 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,50 @@ jobs:
arguments: |
${{ matrix.gradle_task }} -Dbuild.snapshot=false

- name: Coverage
uses: Wandalen/wretry.action@v1.3.0
with:
attempt_limit: 3
attempt_delay: 2000
action: codecov/codecov-action@v3
with: |
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
files: ./build/reports/jacoco/test/jacocoTestReport.xml

- uses: actions/upload-artifact@v3
- uses: alehechka/upload-tartifact@v2
if: always()
with:
name: ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports
name: ${{ matrix.platform }}-JDK${{ matrix.jdk }}-${{ matrix.gradle_task }}-reports
path: |
./build/reports/

- name: check archive for debugging
if: always()
run: echo "Check the artifact ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports for detailed test results"
report-coverage:
needs:
- "test"
- "integration-tests"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: downloaded-artifacts

- name: Display structure of downloaded files
run: ls -R
working-directory: downloaded-artifacts

- name: Extract downloaded artifacts
run: |
for archive in ./*/artifact.tar; do
(cd "$(dirname "$archive")" && tar -xvf artifact.tar)
done
working-directory: downloaded-artifacts

- name: Display structure of downloaded files
run: ls -R
working-directory: downloaded-artifacts

- name: Upload Coverage with retry
uses: Wandalen/wretry.action@v1.3.0
with:
attempt_limit: 5
attempt_delay: 2000
action: codecov/codecov-action@v3
with: |
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
directory: downloaded-artifacts
verbose: true


integration-tests:
name: integration-tests
Expand Down Expand Up @@ -108,6 +131,14 @@ jobs:
arguments: |
integrationTest -Dbuild.snapshot=false

- uses: alehechka/upload-tartifact@v2
if: always()
with:
name: integration-${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports
path: |
./build/reports/


resource-tests:
env:
CI_ENVIRONMENT: resource-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- run: OPENDISTRO_SECURITY_TEST_OPENSSL_OPT=true ./gradlew test

- uses: actions/upload-artifact@v3
- uses: alehechka/upload-tartifact@v2
if: always()
with:
name: ${{ matrix.jdk }}-${{ matrix.test-run }}-reports
Expand Down
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,21 @@ task integrationTest(type: Test) {
classpath = sourceSets.integrationTest.runtimeClasspath
//run the integrationTest task after the test task
shouldRunAfter test
jacoco {
excludes = [
"com.sun.jndi.dns.*",
"com.sun.security.sasl.gsskerb.*",
"java.sql.*",
"javax.script.*",
"org.jcp.xml.dsig.internal.dom.*",
"sun.nio.cs.ext.*",
"sun.security.ec.*",
"sun.security.jgss.*",
"sun.security.pkcs11.*",
"sun.security.smartcardio.*",
"sun.util.resources.provider.*"
]
}
}

//run the integrationTest task before the check task
Expand Down
Loading