Skip to content

Commit

Permalink
github-actions: update jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBubel committed Jan 13, 2024
1 parent 06b425e commit 05b4a70
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
name: "Deploy Python Lib"
name: "Test Python Lib"
on:
release:
types:
- created
push:
branches:
- main
- devel
- deploy
pull_request:

permissions:
contents: read
pull-requests: read

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-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 pytest
- name: Install lib
run: |
python setup.py develop
- name: pytest
run: |
pytest GPy/testing
build-windows:
strategy:
matrix:
Expand Down Expand Up @@ -124,7 +155,7 @@ jobs:

deploy:
runs-on: ubuntu-latest
needs: [build-linux, build-windows, build-mac]
needs: [test, build-linux, build-windows, build-mac]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -138,7 +169,7 @@ jobs:
run: |
pip install --upgrade pip
pip install twine
- name: Download all artifacts to a specific directory
uses: actions/download-artifact@v3
with:
Expand All @@ -148,8 +179,8 @@ jobs:
run: |
ls -R dist
# - name: Upload to PyPI using twine
# run: twine upload --skip-existing wheelhouse/*
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Upload to PyPI using twine
run: twine upload --skip-existing wheelhouse/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
42 changes: 0 additions & 42 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 05b4a70

Please sign in to comment.