replace Pipenv with poetry #102
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 package | |
on: | |
push: | |
branches: [ ] | |
pull_request: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
make setup | |
- name: Test | |
run: | | |
make test | |
dist: | |
needs: [build] | |
if: startsWith(github.ref, 'refs/heads/master') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
make setup | |
- name: Prepare distribution | |
run: | | |
make dist | |
- name: Publish (test PyPi) | |
env: | |
POETRY_HTTP_BASIC_FOO_USERNAME: __token__ | |
POETRY_HTTP_BASIC_FOO_PASSWORD: ${{ secrets.test_pypi_apikey }} | |
run: | | |
make publish.testpypi | |
- name: Install (test PyPi) | |
run: | | |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple dockerized | |
dockerized version | |
- name: Publish (PyPi) | |
env: | |
POETRY_HTTP_BASIC_FOO_USERNAME: __token__ | |
POETRY_HTTP_BASIC_FOO_PASSWORD: ${{ secrets.pypi_apikey }} | |
run: | | |
make publish | |
- name: Install (PyPi) | |
run: | | |
pip install dockerized | |
dockerized version |