Skip to content

integration

integration #341

Workflow file for this run

on:
schedule:
# Run at 02:20UTC every day.
- cron: '20 2 * * *'
workflow_dispatch:
name: integration
jobs:
check-env:
outputs:
has-key: ${{ steps.project-id.outputs.defined }}
runs-on: ubuntu-latest
steps:
- id: project-id
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
if: "${{ env.GCP_PROJECT_ID != '' }}"
run: echo "::set-output name=defined::true"
integration-test:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- run: java -version
- name: Run unit tests
run: mvn test -B
- name: Setup GCloud
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.JSON_SERVICE_ACCOUNT_CREDENTIALS }}
export_default_credentials: true
- name: Run integration tests
run: ./gradlew --no-daemon integrationTest
env:
SPANNER_PROJECT: ${{ secrets.GCP_PROJECT_ID }}
SPANNER_INSTANCE: ${{ secrets.SPANNER_INSTANCE }}