introduce new github workflow for python connectors #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Connectors | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "estuary-cdk/**" | |
- "source-asana/**" | |
- "source-google-sheets-native/**" | |
- "source-hubspot-native/**" | |
pull_request: | |
branches: [main] | |
paths: | |
- "estuary-cdk/**" | |
- "source-asana/**" | |
- "source-google-sheets-native/**" | |
- "source-hubspot-native/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
py_connector: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
connector: | |
- name: source-asana | |
type: capture | |
version: v1 | |
- name: source-hubspot-native | |
type: capture | |
version: v1 | |
- name: source-google-sheets-native | |
type: capture | |
version: v1 | |
steps: | |
- id: setup | |
uses: .github/actions/setup | |
with: | |
setup_gcloud: false | |
- name: Setup Python for ${{ matrix.connector }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Python connector ${{ matrix.connector }} tests | |
run: | | |
cd ${{ matrix.connector }} | |
poetry install | |
source $(poetry env info --path)/bin/activate | |
cd .. | |
pytest . | |
- name: Build ${{ matrix.connector }} Python Docker Image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: estuary-cdk/common.Dockerfile | |
load: true | |
build-args: | | |
CONNECTOR_NAME=${{ matrix.connector.name }} | |
CONNECTOR_TYPE=${{ matrix.connector.type }} | |
tags: ghcr.io/estuary/${{ matrix.connector }}:local | |
- id: deploy | |
uses: .github/actions/deploy | |
with: | |
connector: ${{ matrix.connector.name }} | |
tag_sha: ${{ steps.setup.outputs.tag_sha }} | |
tag_version: ${{ matrix.connector.version }} | |
variants: ${{ matrix.connector.variants }} |