-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Unit Tests suites to have better visibility of the tests being run in different top level modules. Added bonus it cuts total UT/CodeCov runtime by ~10mins due to more parallelism. --------- Co-authored-by: Sourav Maji <[email protected]>
- Loading branch information
1 parent
020f099
commit 697ccf9
Showing
2 changed files
with
100 additions
and
49 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
arg: | ||
required: true | ||
type: string | ||
artifact_suffix: | ||
required: true | ||
type: string | ||
|
||
|
||
jobs: | ||
reusable_job: | ||
name: "Unit Tests And Coverage" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
jdk: [ 8, 11, 17 ] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ matrix.jdk }} | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
- shell: bash | ||
run: | | ||
git remote set-head origin --auto | ||
git remote add upstream https://github.com/linkedin/venice | ||
git fetch upstream | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
- name: Run Unit Tests with Code Coverage | ||
run: ./gradlew -x :internal:venice-avro-compatibility-test:test ${{ inputs.arg }} | ||
- name: Package Build Artifacts | ||
if: success() || failure() | ||
shell: bash | ||
run: | | ||
mkdir ${{ inputs.artifact_suffix }}-artifacts | ||
find . -path "**/build/reports/*" -or -path "**/build/test-results/*" > artifacts.list | ||
rsync -R --files-from=artifacts.list . ${{ inputs.artifact_suffix }}-artifacts | ||
tar -zcvf ${{ inputs.artifact_suffix }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ inputs.artifact_suffix }}-artifacts | ||
- name: Upload Build Artifacts | ||
if: success() || failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.artifact_suffix }}-jdk${{ matrix.jdk }} | ||
path: ${{ inputs.artifact_suffix }}-jdk${{ matrix.jdk }}-logs.tar.gz | ||
retention-days: 30 |
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