Files
linea-monorepo/.github/workflows/coordinator-testing.yml
Julien Marchand a001342170 chore: Initial commit
Co-authored-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Co-authored-by: Alexandre Belling <alexandrebelling8@gmail.com>
Co-authored-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com>
Co-authored-by: Bradley Bown <bradbown@googlemail.com>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: Nikolai Golub <nikolai.golub@consensys.net>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com>
Co-authored-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Co-authored-by: Azam Soleimanian <49027816+Soleimani193@users.noreply.github.com>
Co-authored-by: Andrei A <andrei.alexandru@consensys.net>
Co-authored-by: Arijit Dutta <37040536+arijitdutta67@users.noreply.github.com>
Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com>
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>
Co-authored-by: gusiri <dreamerty@postech.ac.kr>
Co-authored-by: FlorianHuc <florian.huc@gmail.com>
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Julink <julien.fontanel@consensys.net>
Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com>
Co-authored-by: Jakub Trąd <jakubtrad@gmail.com>
Co-authored-by: Alessandro Sforzin <alessandro.sforzin@consensys.net>
Co-authored-by: Olivier Bégassat <olivier.begassat.cours@gmail.com>
Co-authored-by: Steve Huang <97596526+stevehuangc7s@users.noreply.github.com>
Co-authored-by: bkolad <blazejkolad@gmail.com>
Co-authored-by: fadyabuhatoum1 <139905934+fadyabuhatoum1@users.noreply.github.com>
Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com>
Co-authored-by: Eduardo Andrade <eduardofandrade@gmail.com>
Co-authored-by: Ivo Kubjas <tsimmm@gmail.com>
Co-authored-by: Ludcour <ludovic.courcelas@consensys.net>
Co-authored-by: m4sterbunny <harrie.bickle@consensys.net>
Co-authored-by: Alex Panayi <145478258+alexandrospanayi@users.noreply.github.com>
Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net>
Co-authored-by: ThomasPiellard <thomas.piellard@gmail.com>
2024-07-31 18:17:20 +02:00

99 lines
3.5 KiB
YAML

name: coordinator-testing
on:
workflow_call:
inputs:
commit_tag:
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: true
DOCKERHUB_TOKEN:
required: true
jobs:
cache-docker-images:
uses: ./.github/workflows/cache-docker-images.yml
secrets: inherit
run-tests:
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
runs-on: ubuntu-22.04
name: Coordinator tests
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Restore cached images
id: restore-cached-images
uses: actions/cache/restore@v4.0.2
with:
path: ~/docker-images
key: cached-images
restore-keys: |
cached-images
# Install pnpm to compile smart contracts
- name: Setup nodejs environment
uses: ./.github/actions/setup-nodejs
with:
pnpm-install-options: '--frozen-lockfile --prefer-offline --filter contracts --ignore-scripts'
- name: Build coordinator and Unit tests
run: |
./gradlew -V coordinator:app:buildNeeded
- name: Run integration tests
run: |
./gradlew integrationTest
- name: Run Jacoco
run: |
./gradlew jacocoRootReport
- name: Upload Jacoco test coverage report
uses: actions/upload-artifact@v4
with:
name: jacocoRootReport-${{ env.COMMIT_TAG }}.xml
if-no-files-found: error
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
with:
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
reporttypes: MarkdownSummary
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
title: 'Kotlin Code Coverage'
- name: DeltaReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
with:
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports'
reporttypes: MarkdownDeltaSummary
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
title: 'Kotlin Code Coverage'
- name: Upload coverage report artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: CoverageReport
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports
- name: Write code coverage delta to PR
uses: mshick/add-pr-comment@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports/DeltaSummary.md