Skip to content

Update README.md

Update README.md #516

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build-unix-mac-win
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# To fix an error when running Poetry on Windows
# (https://github.com/python-poetry/poetry/issues/2629),
# we set Poetry's cache directory to .poetry_cache in the current directory.
# It makes it easier to later remove the virtualenv when it's broken.
# Absolute path is necessary to avoid this issue:
# https://github.com/python-poetry/poetry/issues/3049
POETRY_CACHE_DIR: ${{ github.workspace }}/.poetry_cache
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10']
os: [ubuntu-latest, macos-13, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch
uses: actions/checkout@v4
- name: Install required version of Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2
# with:
# poetry-version: 1.1.2
- name: Set up the cache
uses: actions/cache@v3
with:
path: .poetry_cache
key: tests-poetry-cache-v12-${{ matrix.os }}-py${{ matrix.python-version }}
- name: Install project dependencies
run: poetry install -vv || { rm -rf .poetry_cache/virtualenvs/*; poetry install -vv; }
- name: Run tests with Poetry
run: poetry run pytest