mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 15:38:06 -05:00
98 lines
3.7 KiB
YAML
98 lines
3.7 KiB
YAML
name: staterecovery-testing
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
commit_tag:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
DOCKERHUB_USERNAME:
|
|
required: false
|
|
DOCKERHUB_TOKEN:
|
|
required: false
|
|
|
|
concurrency:
|
|
group: staterecovery-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 }}
|
|
# ~2.5 mins saved vs large
|
|
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-large
|
|
name: Staterecovery 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@8379f6a1328ee0e06e2bb424dadb7b159856a326 # 4.4.0
|
|
- name: Staterecovery - Build and Unit tests
|
|
run: |
|
|
./gradlew besu-plugins:state-recovery:besu-plugin:buildNeeded
|
|
# Install pnpm to deploy smart contracts
|
|
# FIXME: use web3j to deploy contracts and remove this.
|
|
- name: Setup nodejs environment
|
|
uses: ./.github/actions/setup-nodejs
|
|
with:
|
|
pnpm-install-options: '--frozen-lockfile --prefer-offline --filter contracts --ignore-scripts'
|
|
- name: Staterecovery - Build plugin shadowJar
|
|
run: |
|
|
./gradlew besu-plugins:state-recovery:besu-plugin:shadowJar
|
|
- name: Login to Docker Hub
|
|
if: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
|
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #v3.4.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Run integration tests
|
|
timeout-minutes: 15
|
|
run: |
|
|
./gradlew besu-plugins:state-recovery:test-cases:integrationTest
|
|
# - name: Setup upterm session
|
|
# if: ${{ inputs.e2e-tests-with-ssh }}
|
|
# uses: lhotari/action-upterm@b0357f23233f5ea6d58947c0c402e0631bab7334 #v1
|
|
# Stack fails to start in CI - Disable for now
|
|
# - name: Run E2E tests
|
|
# timeout-minutes: 15
|
|
# run: |
|
|
# mkdir -p tmp/local/
|
|
# chmod -R a+w tmp/local/
|
|
# ./gradlew besu-plugins:state-recovery:test-cases:e2eTest
|
|
# TMP disable as it conflicts with coordinator report
|
|
# - name: Run Jacoco Staterecovery
|
|
# run: |
|
|
# ./gradlew jacocoRootReport
|
|
# - name: Upload Jacoco report Staterecovery
|
|
# 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 Staterecovery
|
|
# if: ${{ env.CODECOV_TOKEN != '' }}
|
|
# uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 #v5.4.3
|
|
# with:
|
|
# fail_ci_if_error: true
|
|
# files: ${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
|
|
# flags: kotlin
|
|
# os: linux
|
|
# name: codecov-staterecovery
|
|
# verbose: true
|
|
# token: ${{ secrets.CODECOV_TOKEN }}
|