Skip to content

Merge pull request #7 from trocco-io/feature/oauth-m2m #76

Merge pull request #7 from trocco-io/feature/oauth-m2m

Merge pull request #7 from trocco-io/feature/oauth-m2m #76

Workflow file for this run

name: main
on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- 'main'
types: [opened, synchronize]
pull_request_target:
branches:
- 'main'
types: [labeled]
jobs:
test:
name: test
runs-on: ubuntu-latest
concurrency:
group: test-group
cancel-in-progress: false
if: >
${{
github.event_name == 'pull_request' ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe to test')) ||
startsWith(github.ref, 'refs/tags/')
}}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: lint
run: ./gradlew spotlessCheck
- name: Write test secret to file
run: envsubst < ci/config_template.yml > test-config.yml
env:
SERVER_HOSTNAME: ${{ vars.TEST_SERVER_HOSTNAME }}
HTTP_PATH: ${{ vars.TEST_HTTP_PATH }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.TEST_PERSONAL_ACCESS_TOKEN }}
CATALOG_NAME: ${{ vars.TEST_CATALOG_NAME }}
SCHEMA_NAME: ${{ vars.TEST_SCHEMA_NAME }}
TABLE_PREFIX: ${{ vars.TEST_TABLE_PREFIX }}
NON_ASCII_CATALOG_NAME: ${{ vars.TEST_NON_ASCII_CATALOG_NAME }}
NON_ASCII_SCHEMA_NAME: ${{ vars.TEST_NON_ASCII_SCHEMA_NAME }}
STAGING_VOLUME_NAME_PREFIX: ${{ vars.TEST_STAGING_VOLUME_NAME_PREFIX }}
OAUTH2_CLIENT_ID: ${{ vars.TEST_OAUTH2_CLIENT_ID }}
OAUTH2_CLIENT_SECRET: ${{ secrets.TEST_OAUTH2_CLIENT_SECRET }}
- run: ./gradlew test
env:
EMBULK_OUTPUT_DATABRICKS_TEST_CONFIG: "./test-config.yml"
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
needs: [ test ]
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: push gem
uses: trocco-io/push-gem-to-gpr-action@v1
with:
language: java
gem-path: "./build/gems/*.gem"
github-token: "${{ secrets.GITHUB_TOKEN }}"