Skip to content

Manual build

Manual build #10

Workflow file for this run

#
# Copyright 2024 Copyright 2022 Aiven Oy and
# bigquery-connector-for-apache-kafka project contributors
#
# This software contains code derived from the Confluent BigQuery
# Kafka Connector, Copyright Confluent, Inc, which in turn
# contains code derived from the WePay BigQuery Kafka Connector,
# Copyright WePay, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Workflow to check pull requests and new commits to main branches
# This checks the source in the state as if after the merge.
name: Manual build
on:
workflow_dispatch:
workflow_call:
secrets:
GCP_CREDENTIALS:
KCBQ_TEST_PROJECT:
KCBQ_TEST_DATASET:
KCBQ_TEST_BUCKET:
permissions:
contents: write
pull-requests: write
issues: write
# Disallow concurrent runs for the same PR by cancelling in-progress runs
# when new commits are pushed
concurrency:
group: Manual_Build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
cache: maven
- name: Integration tests (Maven)
env:
# Necessary for client builder integration tests that run with
# default application credentials
CREDENTIALS_JSON: ${{ secrets.GCP_CREDENTIALS }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/creds.json
KCBQ_TEST_KEYFILE: /tmp/creds.json
KCBQ_TEST_KEY_SOURCE: FILE
KCBQ_TEST_PROJECT: ${{ secrets.KCBQ_TEST_PROJECT }}
KCBQ_TEST_DATASET: ${{ secrets.KCBQ_TEST_DATASET }}
KCBQ_TEST_BUCKET: ${{ secrets.KCBQ_TEST_BUCKET }}
run: |
echo "$CREDENTIALS_JSON" > /tmp/creds.json
export KCBQ_TEST_TABLE_SUFFIX=_$(date +%s)_$RANDOM
mvn -ntp -P ci -Dskip.unit.tests=true verify
- name: Upload integration test results (Maven)
if: always()
uses: actions/upload-artifact@v4
with:
path: |
**/target/failsafe-reports/*
name: integration-test-results
retention-days: 1