Adding github actions #1
Workflow file for this run
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
name: Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
- '*.md' | |
- '*.rst' | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }}" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
python-version: ["3.11"] | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Set up Poetry cache for Python dependencies | |
uses: actions/cache@v3 | |
if: startsWith(runner.os, 'Linux') | |
with: | |
path: ~/.cache/pypoetry | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ runner.os }}-poetry- | |
- name: "Install poetry" | |
run: "pip install poetry" | |
- name: "Configure poetry" | |
run: "poetry config virtualenvs.create false --local" | |
- name: "Run poetry update" | |
run: "poetry update" | |
- name: "Run tests" | |
run: "poetry run pytest" |