From 5c0a705474f3c473de0738f3e58304d12e3895a8 Mon Sep 17 00:00:00 2001 From: Mathieu Fehr Date: Sat, 7 Dec 2024 15:09:14 +0000 Subject: [PATCH] CI: Add main test workflow --- .github/workflows/ci-core.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci-core.yml diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml new file mode 100644 index 0000000..798e1c0 --- /dev/null +++ b/.github/workflows/ci-core.yml @@ -0,0 +1,42 @@ +# 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: CI - Python-based Testing + +on: + # Trigger the workflow on push or pull request, + # but only for the master branch + push: + branches: + - main + pull_request: + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' # caching pip dependencies + cache-dependency-path: | + setup.py + + - name: Upgrade pip + run: | + pip install --upgrade pip + + - name: Install the package and dev dependencies locally + run: pip install -e ".[dev]" + + - name: Run all tests + run: | + make tests-functional