Skip to content

try to remove avro-to-python-etp from deps to avoid python <4.0 #39

try to remove avro-to-python-etp from deps to avoid python <4.0

try to remove avro-to-python-etp from deps to avoid python <4.0 #39

Workflow file for this run

##
## Copyright (c) 2022-2023 Geosiris.
## SPDX-License-Identifier: Apache-2.0
##
name: Build-and-Push-TEST
on:
push:
branches:
- main
pull_request:
env:
GENERATED_CODE_FOLDER: etptypes
PYTHON_VERSION: 3.9
jobs:
build:
name: Building generated code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate code from avro-to-python-etp
uses: ./.github/actions/generate
with:
python-version: ${{ env.PYTHON_VERSION }}
dest-folder: ${{ env.GENERATED_CODE_FOLDER }}
etp-file-name: ${{ secrets.ETP_FILE_NAME }}
- name: Install dependencies
uses: ./.github/actions/prepare-poetry
with:
python-version: ${{ env.PYTHON_VERSION }}
toml-path: ${{ env.GENERATED_CODE_FOLDER }}
- name: Python Black
run: |
cd ${{ env.GENERATED_CODE_FOLDER }}
poetry run black etptypes
- name: Build Etptypes-python
run: |
cd ${{ env.GENERATED_CODE_FOLDER }}
rm pyproject.toml
cp ${{ github.workspace }}/pyproject.toml .
cp ${{ github.workspace }}/LICENSE .
cp ${{ github.workspace }}/README.md .
poetry build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist-artifact
retention-days: 1
path: |
${{ env.GENERATED_CODE_FOLDER }}/dist
${{ env.GENERATED_CODE_FOLDER }}/pyproject.toml
${{ env.GENERATED_CODE_FOLDER }}/LICENSE
${{ env.GENERATED_CODE_FOLDER }}/README.md
publish:
needs: build
name: Publish to PyPI-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Get build artifacts
uses: actions/download-artifact@v4
with:
name: dist-artifact
path: ${{ env.GENERATED_CODE_FOLDER }}
- name: Install dependencies
uses: ./.github/actions/prepare-poetry
with:
python-version: ${{ matrix.python-version }}
toml-path: ${{ env.GENERATED_CODE_FOLDER }}
- name: Upload to PyPI TEST
run: |
cd ${{ env.GENERATED_CODE_FOLDER }}
poetry config repositories.test https://test.pypi.org/legacy/
poetry config http-basic.test ${{ secrets.POETRY_PYPI_TOKEN_USERNAME}} ${{ secrets.POETRY_TEST_PYPI_TOKEN_PASSWORD}}
poetry publish --repository test