diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f31dcd1..6f55b1d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/push_pr.yml b/.github/workflows/push_pr.yml new file mode 100644 index 0000000..5598ddc --- /dev/null +++ b/.github/workflows/push_pr.yml @@ -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 \ No newline at end of file