Skip to content

Update the readme

Update the readme #30

Workflow file for this run

name: Tests
on:
pull_request:
branches: [master]
jobs:
build:
name: Build tool
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
python-version:
- '3.7'
- '3.8'
- '3.9'
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{matrix.python-version}}
# Perma-cache Poetry since we only need it for checking pyproject version
- name: Cache Poetry
id: cache-poetry
uses: actions/[email protected]
with:
path: ~/.poetry
key: ${{ matrix.os }}-poetry
# Only runs when key from caching step changes
- name: Install latest version of Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
curl -sSL https://install.python-poetry.org | python -
# Poetry still needs to be re-prepended to the PATH on each run, since
# PATH does not persist between runs.
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Check pyproject.toml validity
run: poetry check --no-interaction
- name: Cache dependencies
id: cache-deps
uses: actions/[email protected]
with:
path: ${{github.workspace}}/.venv
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ matrix.os }}-
- name: Install deps
if: steps.cache-deps.cache-hit != 'true'
run: |
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Run tests
run: poetry run pytest -v --cov