update github workflow for testing

This commit is contained in:
Martin Bubel 2024-07-20 13:30:27 +02:00
parent 580a6ce54c
commit c8e3333e6c

View file

@ -13,10 +13,10 @@ permissions:
pull-requests: read pull-requests: read
jobs: jobs:
test-windows: test-gpy:
strategy: strategy:
matrix: matrix:
os: [windows-latest] os: [windows-latest, ubuntu-latest, macos-latest]
python: ['3.9', '3.10', '3.11', '3.12'] python: ['3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@ -28,78 +28,24 @@ jobs:
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- name: Install dependencies - name: Install build dependencies
run: | run: |
pip install setuptools pip install setuptools
pip install matplotlib
pip install pytest
- name: Install lib - name: Install lib
run: | run: |
python setup.py develop python setup.py develop
- name: pytest - name: Install test dependencies
run: | run: |
pytest GPy/testing
test-linux:
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
pip install setuptools
pip install matplotlib pip install matplotlib
pip install pytest pip install pytest
- name: Install lib
run: |
python setup.py develop
- name: pytest
run: |
pytest GPy/testing
test-macos:
strategy:
matrix:
os: [macos-latest]
python: ['3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
pip install setuptools
pip install matplotlib
pip install pytest
- name: Install lib
run: |
python setup.py develop
- name: pytest - name: pytest
run: | run: |
pytest GPy/testing pytest GPy/testing
build-windows: build-gpy:
if: github.event_name == 'release' if: github.event_name == 'release'
strategy: strategy:
matrix: matrix:
@ -216,7 +162,7 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos] needs: [test-gpy, build-linux, build-windows, build-macos]
if: github.event_name == 'release' if: github.event_name == 'release'
steps: steps:
- name: Checkout - name: Checkout