chore: update deps #26
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://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.4.0] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
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@v3 | |
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@v3 | |
with: | |
token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
- name: Insstall poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "poetry" | |
- run: poetry install | |
- run: make readme | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
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> |