Files
linea-monorepo/.github/workflows/coordinator-testing.yml
Alain Nicolas 7d871aff3f chore: Remove unused CI pipeline (#777)
* chore: Remove unused CI pipeline

* feat: removed all actions cache related codes in workflows

* chore: Improve comment

---------

Co-authored-by: jonesho <jones.ho@consensys.net>
2025-03-14 14:19:08 +01:00

79 lines
2.8 KiB
YAML

name: coordinator-testing
on:
workflow_call:
inputs:
commit_tag:
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: false
DOCKERHUB_TOKEN:
required: false
concurrency:
group: coordinator-testing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
run-tests:
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# ? Seems to fail more often on xl
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-large
name: Coordinator tests
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b #v4.5.0
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 #v4.2.1
# 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: Login to Docker Hub
if: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run integration tests
timeout-minutes: 15
run: |
./gradlew coordinator:app:integrationTestAllNeeded
- 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: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: ${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
flags: kotlin
os: linux
name: codecov-coordinator
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}