Files
linea-monorepo/.github/workflows/coordinator-testing.yml
Roman Vaseev 3f9b0d9a47 Fixing dockerhub rate limiting issue on CI (#153)
* Changing sequence of dockerhub login and QEMU setup

* Adding docker login to Coordinator tests as well

* Moved with declaration to Login to Docker Hub as well

* Updating docker action version

* Updating docker login actions from v1 and v2 to v3

* Updating qemu action as well
2024-10-07 16:06:50 +02:00

82 lines
2.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
concurrency:
group: coordinator-testing-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
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: [self-hosted, ubuntu-22.04, X64, medium]
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- 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: Upload coverage to Codecov
uses: codecov/codecov-action@v4
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 }}