Skip to content

Merge branch '1.1.0' #105

Merge branch '1.1.0'

Merge branch '1.1.0' #105

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
env:
USING_COVERAGE: '3.9, 3.10, 3.11, 3.12'
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11, 3.12"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: Install poetry
run: |
python -m pip install poetry
- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). Note the cache
# key: if you're using multiple Python versions, or multiple OSes, you'd need to include
# them in the cache key. I'm not, so it can be simple and just depend on the poetry.lock.
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
# key: pydeps-${{ hashFiles('**/poetry.lock') }-${{ matrix.python-version }-${{ runner.os }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pydeps-${{ hashFiles('**/poetry.lock') }}
# Install dependencies. `--no-root` means "install all dependencies but not the project
# itself", which is what you want to avoid caching _your_ code. The `if` statement
# ensures this only runs on a cache miss.
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
# Now install _your_ project. This isn't necessary for many types of projects -- particularly
# things like Django apps don't need this. But it's a good idea since it fully-exercises the
# pyproject.toml and makes that if you add things like console-scripts at some point that
# they'll be installed and working.
- run: poetry install --no-interaction