Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Python CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.11', '3.12' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add cache for pip:

          cache: pip
          # Cache will be restored/updated when any of these files change
          cache-dependency-path: |
            requirements*.txt
            pyproject.toml
            poetry.lock

cache: pip
# Cache will be restored/updated when any of these files change
cache-dependency-path: |
requirements*.txt
pyproject.toml
poetry.lock

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi

- name: Run tests
run: |
pytest -q
Loading