Release v2.0.1 #4
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
--- | |
name: CI | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
POETRY_VERSION: 1.8.4 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4.2.2 | |
- name: Setup Python | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get the precise Python version | |
run: echo "PYTHON_ID=$( python -VV | sha256sum | awk '{ print $1 }' )" >> "$GITHUB_ENV" | |
- name: Load the cached Poetry installation | |
id: cached-poetry | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ~/.local | |
key: poetry-${{ env.POETRY_VERSION }}-py_${{ env.PYTHON_ID}}-0 | |
- name: Install Poetry | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1.4.1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load the cached dependencies | |
id: cached-deps | |
uses: actions/cache@v4.1.2 | |
with: | |
path: .venv | |
key: py${{ matrix.python-version }}-deps-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-deps.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Perform package installation | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: poetry run pytest |