chore(deps): bump the python group across 1 directory with 7 updates #382
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
--- | |
# This workflow will install Python dependencies, run tests and lint with a | |
# variety of Python versions | |
# For more information see: | |
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python | |
# yamllint disable rule:truthy | |
on: | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
checks: write | |
id-token: write | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10', '3.12'] | |
poetry-version: [1.7.1] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup Poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Setup a local virtual environment (if no poetry.toml file) | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
- uses: actions/cache@v4 | |
name: Define a cache for the virtual environment | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Test with pytest | |
run: | | |
make test | |
mv test-results.xml test-results-${{ matrix.python-version }}.xml | |
# we want to make test-results.xml an artifact | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-${{ matrix.python-version }} | |
path: test-results-${{ matrix.python-version }}.xml | |
- name: Test Summary | |
uses: test-summary/action@v2 | |
with: | |
paths: '**/test-results-*.xml' | |
if: always() |