Skip to content

Commit

Permalink
Add maven property to skip integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RVRhub committed Jul 8, 2024
1 parent a2005ea commit 9f44e09
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
inputs:
skip_integration_tests:
description: "Skip integration tests"
required: false
type: boolean
default: false

env:
mvn_options: --batch-mode -Dstyle.color=always -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS
Expand All @@ -29,5 +36,8 @@ jobs:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Determine if integration tests should be skipped
run: echo "SKIP_INTEGRATION_TESTS=true" >> $GITHUB_ENV
shell: bash
- name: Build with Maven
run: ./mvnw $mvn_options verify --file pom.xml
run: ./mvnw $mvn_options verify --file pom.xml -DskipBigQueryIntegrationTests=${{ inputs.skip_integration_tests }}
16 changes: 16 additions & 0 deletions .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven for Pull Request

on:
push:
branches-ignore: [ main ]
pull_request:
branches-ignore: [ main ]

jobs:
build:
uses: ./.github/workflows/maven.yml@main
with:
skip_integration_tests: true

0 comments on commit 9f44e09

Please sign in to comment.