mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 12:17:57 -05:00
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
name: transaction-exclusion-api-testing
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
DOCKERHUB_USERNAME:
|
|
required: false
|
|
DOCKERHUB_TOKEN:
|
|
required: false
|
|
workflow_dispatch:
|
|
inputs:
|
|
coverage:
|
|
description: To generate test report
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
|
|
concurrency:
|
|
group: transaction-exclusion-api-testing-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
run-tests:
|
|
env:
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
# ~1.5 mins saved vs small
|
|
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-med
|
|
name: Transaction exclusion api 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
|
|
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # 4.4.0
|
|
- name: Run tests with coverage
|
|
if: ${{ inputs.coverage }}
|
|
run: |
|
|
./gradlew transaction-exclusion-api:app:buildNeeded jacocoRootReport
|
|
- name: Run tests without coverage
|
|
if: ${{ !inputs.coverage }}
|
|
run: |
|
|
./gradlew transaction-exclusion-api:app:buildNeeded
|
|
- 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
|
|
run: |
|
|
./gradlew transaction-exclusion-api:app:integrationTestAllNeeded
|