Skip to content

Manual build

Manual build #1

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 workflow
on:
workflow_dispatch:
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: ${{ github.workflow }}-${{ 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: Test
env:
TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
run: |
echo ${#TEST_GITHUB_TOKEN}
echo ${#GCP_CREDENTIALS}
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# distribution: 'adopt'
# java-version: 17
# cache: maven
# - name: License header check
# run: |
# mvn -ntp license:remove license:format
# if [[ -n $(git status -s) ]]; then
# echo 1>&2 'Some files do not have the correct license header:'
# git diff --name-only 1>&2
# echo 1>&2 'Please update the license headers for these files by running `mvn license:remove license:format`'
# exit 1
# fi
# - name: Build (Maven)
# run: mvn -P ci --batch-mode clean package -DskipTests
# - name: Unit tests (Maven)
# run: mvn -ntp -P ci --batch-mode test
# - name: "upload build failure reports"
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: unit-test-results
# path: |
# **/target/*-reports/**
# retention-days: 1
# - 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: ${{ secrets.GCP_CREDENTIALS }}
# KCBQ_TEST_KEY_SOURCE: JSON
# KCBQ_TEST_PROJECT: ${{ secrets.KCBQ_TEST_PROJECT }}
# KCBQ_TEST_DATASET: ${{ secrets.KCBQ_TEST_DATASET }}
# KCBQ_TEST_BUCKET: ${{ secrets.KCBQ_TEST_BUCKET }}
# run: |
# export
# 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: 3