Patch: #47
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: build-test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.12"] | |
poetry-version: [latest] | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
- name: Build and install project | |
run: | | |
poetry build | |
poetry install | |
- name: Run tests with pytest | |
run: | | |
poetry shell | |
pytest --version | |
pytest tests | |
- name: Publish any new version to PyPi | |
run: | | |
- name: Publish to PyPi | |
run: | | |
poetry publish --build | |
if [ $? -ne 0 ]; then | |
echo "Warning: Version has not been incremented. No new version published." | |
fi |