Skip to content

Split PRB into three jobs that can run in parallel #132

Split PRB into three jobs that can run in parallel

Split PRB into three jobs that can run in parallel #132

Workflow file for this run

name: Pull Request
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
# Three parallel jobs:
# 1. style: Runs all checks on the build (including compilation static analysis) except the tests
# This allows us to catch anything related to build and style faster, as we don't have to wait
# on tests to complete. It also allows the test jobs to continue even if there's a style failure.
# 2. core-tests: Runs the fdb-record-layer-core tests. This is the longest test suite of the
# various subprojects, so separating it out allows us to speed up the PRB time.
# 3. other-tests: Runs the rest of the tests. This tests everything else
style:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Checkout sources
uses: actions/[email protected]
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Run Gradle Build
uses: ./actions/run-gradle
with:
gradle_command: build -x test -x destructiveTest -PreleaseBuild=false -PpublishBuild=false -PspotbugsEnableHtmlReport
core-tests:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Checkout sources
uses: actions/[email protected]
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: :fdb-record-layer-core:test :fdb-record-layer-core:destructiveTest
gradle_args: -PreleaseBuild=false -PpublishBuild=false
- name: Publish Test Reports
if: always()
uses: actions/[email protected]
with:
name: core-test-reports
path: |
test-reports/fdb-record-layer-core/
- name: Test Summary
if: always()
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86
with:
paths: |
fdb-record-layer-core/.out/test-results/**/TEST-*.xml
- name: Test Coverage Comment
uses: madrapps/jacoco-report@7c362aca34caf958e7b1c03464bd8781db9f8da7
with:
paths: |
fdb-record-layer-core/.out/reports/jacoco/test/jacocoTestReport.xml,
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 75
min-coverage-changed-files: 80
other-tests:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
steps:
- name: Checkout sources
uses: actions/[email protected]
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: test -x :fdb-record-layer-core:test destructiveTest -x :fdb-record-layer-core:destructiveTest
gradle_args: -PreleaseBuild=false -PpublishBuild=false
- name: Publish Test Reports
if: always()
uses: actions/[email protected]
with:
name: other-test-reports
path: |
test-reports/fdb-java-annotations/
test-reports/fdb-extensions/
test-reports/fdb-record-layer-icu/
test-reports/fdb-record-layer-spatial/
test-reports/fdb-record-layer-lucene/
test-reports/fdb-record-layer-jmh/
test-reports/examples/
test-reports/fdb-relational-api/
test-reports/fdb-relational-core/
test-reports/fdb-relational-cli/
test-reports/fdb-relational-grpc/
test-reports/fdb-relational-jdbc/
test-reports/fdb-relational-server/
test-reports/yaml-tests/
- name: Test Summary
if: always()
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86
with:
paths: |
fdb-java-annotations/.out/test-results/**/TEST-*.xml
fdb-extensions/.out/test-results/**/TEST-*.xml
fdb-record-layer-icu/.out/test-results/**/TEST-*.xml
fdb-record-layer-spatial/.out/test-results/**/TEST-*.xml
fdb-record-layer-lucene/.out/test-results/**/TEST-*.xml
fdb-record-layer-jmh/.out/test-results/**/TEST-*.xml
examples/.out/test-results/**/TEST-*.xml
fdb-relational-api/.out/test-results/**/TEST-*.xml
fdb-relational-core/.out/test-results/**/TEST-*.xml
fdb-relational-cli/.out/test-results/**/TEST-*.xml
fdb-relational-grpc/.out/test-results/**/TEST-*.xml
fdb-relational-jdbc/.out/test-results/**/TEST-*.xml
fdb-relational-server/.out/test-results/**/TEST-*.xml
yaml-tests/.out/test-results/**/TEST-*.xml
- name: Test Coverage Comment
uses: madrapps/jacoco-report@7c362aca34caf958e7b1c03464bd8781db9f8da7
with:
paths: |
fdb-extensions/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-record-layer-icu/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-record-layer-spatial/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-record-layer-lucene/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-relational-api/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-relational-core/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-relational-cli/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-relational-grpc/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-relational-jdbc/.out/reports/jacoco/test/jacocoTestReport.xml,
fdb-relational-server/.out/reports/jacoco/test/jacocoTestReport.xml,
yaml-tests/.out/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 75
min-coverage-changed-files: 80