From 883936b44b0c99eb1af4deee4f7e514d6f39e200 Mon Sep 17 00:00:00 2001 From: Tim Nicholls Date: Fri, 29 Sep 2023 16:04:08 +0100 Subject: [PATCH] Update python workflow to run tests --- .github/workflows/python.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 75158987..ba4bc6c6 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -4,15 +4,31 @@ on: [push, pull_request] jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7, 3.8, 3.9, 3.10, 3.11] + defaults: + run: + working-directory: python + steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install odin-data + - name: Set up python ${{ matrix.python-version }} + users: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install odin-data python pacakge run: | - python3 -m venv venv && source venv/bin/activate && pip install --upgrade pip - cd python + python -m pip install --upgrade pip pip install . python -c "from odin_data import __version__; print(__version__)" + + - name: Run tests + run: + pytest -vs +