-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (51 loc) · 1.94 KB
/
prs_and_commits.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Workflow to check pull requests and new commits to main branches
# This checks the source in the state as if after the merge.
name: Pull request checks
on:
pull_request:
branches: [ master, storage-write-api, storage-write-api-cleanup ]
push:
branches: [ master, storage-write-api, storage-write-api-cleanup ]
# 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: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 8
cache: maven
- name: Build (Maven)
run: mvn -P ci --batch-mode clean package -DskipTests
- name: Unit tests (Maven)
run: mvn -P ci --batch-mode test
- 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 -P ci -Dskip.unit.tests=true verify
- name: Upload integration test results (Maven)
if: always()
uses: actions/upload-artifact@v4
with:
path: kcbq-connector/target/failsafe-reports/*
name: integration-test-results