Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run build with all supported python versions before publishing to pypi #3726

Merged
merged 4 commits into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/publish-cdk-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,43 @@ on:
workflow_dispatch:
inputs:
dry-run:
description: 'Indicates whether this is a dry-run or not. A dry-run publishes to Test PyPi. A proper run publishes to actual PyPi servers.'
description: 'By default dry-run publishes to Test PyPi. Use "false" to publish to actual PyPi servers.'
required: false
comment-id:
description: 'The comment-id of the slash command. Used to update the comment with the status.'
required: false

jobs:
publish-cdk:

build-cdk:
runs-on: ubuntu-latest
strategy:
matrix:
# 3.7.1 - is a minimal of 3.7.X version supported by github actions
python-version: [3.7.1, 3.7, 3.8, 3.9]
midavadim marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: gabrielfalcao/pyenv-action@v7
- uses: actions/setup-python@v2
with:
default: 3.7.0
python-version: ${{ matrix.python-version }}
- uses: actions/setup-java@v1
with:
java-version: '14'
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Build CDK Package
run: ./gradlew --no-daemon :airbyte-cdk:python:build
- name: Add Failure Comment
if: github.event.inputs.comment-id && !success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

publish-cdk:
needs: build-cdk
runs-on: ubuntu-latest
steps:
- name: Link comment to workflow run
if: github.event.inputs.comment-id
uses: peter-evans/create-or-update-comment@v1
Expand All @@ -35,14 +56,11 @@ jobs:
echo "pypi_url=https://test.pypi.org/legacy/" >> $GITHUB_ENV
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Build CDK Package
# By default .python-version is 3.7.9
run: pyenv local 3.7.0 && ./gradlew --no-daemon :airbyte-cdk:python:build
- name: Publish Python Package
if: success()
uses: mariamrf/py-package-publish-action@v1.1.0
with:
python_version: '3.7.0'
# specify the same version as in ~/.python-version
python_version: '3.7.9'
pip_version: '21.1'
subdir: 'airbyte-cdk/python/'
env:
Expand Down