Skip to content

v0.5.1

v0.5.1 #117

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
pull_request:
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.9, "3.10"]
poetry-version: [1.8.2]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: View poetry --help
run: poetry --help
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install dependencies
run: |
poetry run pip install --upgrade pip
poetry install
- name: Run pytest
run: poetry run pytest -q tests
readme:
runs-on: ubuntu-latest
needs: ci
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: Insstall poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "poetry"
- run: poetry install
- run: make readme
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "ci: Update readme"
branch: ${{ github.head_ref }}
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>