Skip to content

version bump and further restrict publishing during workflow matrix h… #40

version bump and further restrict publishing during workflow matrix h…

version bump and further restrict publishing during workflow matrix h… #40

name: Test and Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
poetry-version: ["1.6.1", "1.7.1"]
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: install build dependencies
run: poetry install --with test,vault --without dev
- name: run the tests
run: |
poetry run pytest
- name: build package
run: poetry build
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error