Skip to content

github workflow

github workflow #1

Workflow file for this run

name: Run tests
on:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches: [ main ]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
run-tests:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
# version: ['3.8', '3.9', '3.10', '3.11', '3.12']
version: ['3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
# - name: Cache dependencies
# id: cache-deps
# uses: actions/cache@v3
# with:
# path: |
# .tox
# ~/.cache/pip
# ~/.cache/pypoetry
# ~/.local/bin/poetry
# ~/.local/share/pypoetry
# key: ${{ runner.os }}-python-${{ matrix.version }}-poetry-${{ hashFiles('.github/workflows/run-tests.yml', 'pyproject.toml', 'tox.ini') }}
- name: Install Poetry
if: steps.cache-deps.outputs.cache-hit != 'true' && ! startsWith (matrix.os, 'windows')
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install Poetry (Windows)
if: steps.cache-deps.outputs.cache-hit != 'true' && startsWith (matrix.os, 'windows')
shell: pwsh
run: |
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
- name: Run tests
run: |
pytest