Poetry 2 upgrade (PEP612-conformity) and gh-actions renovation #824
Workflow file for this run
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
# Action passes pedantic check with zizmor 1.3.0, https://woodruffw.github.io/zizmor/ | |
name: Build and test linkml-runtime | |
on: [pull_request] | |
permissions: {} | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- os: windows-latest | |
python-version: "3.8" | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
steps: | |
#---------------------------------------------- | |
# install poetry | |
#---------------------------------------------- | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
# We install poetry-dynamic-versioning into pipx because the automatic installallation | |
# by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 | |
- name: Install poetry-dynamic-versioning | |
if: runner.os == 'Windows' | |
run: | |
pipx inject poetry poetry-dynamic-versioning | |
#---------------------------------------------- | |
# check-out repo and set-up python | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
#---------------------------------------------- | |
# install your root project, if required | |
#---------------------------------------------- | |
- name: Install library | |
run: | | |
poetry install --no-interaction | |
#---------------------------------------------- | |
# coverage report | |
#---------------------------------------------- | |
- name: Generate coverage results | |
shell: bash | |
run: | | |
poetry run coverage run -m pytest | |
poetry run coverage xml | |
poetry run coverage report -m | |
#---------------------------------------------- | |
# upload coverage results | |
#---------------------------------------------- | |
- name: Upload coverage report | |
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 | |
with: | |
name: codecov-results-${{ matrix.os }}-${{ matrix.python-version }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
fail_ci_if_error: false |