Skip to content

Commit 05b4a70

Browse files
committed
github-actions: update jobs
1 parent 06b425e commit 05b4a70

File tree

2 files changed

+42
-53
lines changed

2 files changed

+42
-53
lines changed
Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
1-
name: "Deploy Python Lib"
1+
name: "Test Python Lib"
22
on:
3-
release:
4-
types:
5-
- created
3+
push:
4+
branches:
5+
- main
6+
- devel
7+
- deploy
68
pull_request:
79

810
permissions:
911
contents: read
1012
pull-requests: read
1113

1214
jobs:
15+
test:
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
python: ['3.9', '3.10', '3.11', '3.12']
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.python }}
29+
30+
- name: Install dependencies
31+
run: |
32+
pip install setuptools
33+
pip install matplotlib
34+
pip install pytest
35+
36+
- name: Install lib
37+
run: |
38+
python setup.py develop
39+
40+
- name: pytest
41+
run: |
42+
pytest GPy/testing
43+
1344
build-windows:
1445
strategy:
1546
matrix:
@@ -124,7 +155,7 @@ jobs:
124155

125156
deploy:
126157
runs-on: ubuntu-latest
127-
needs: [build-linux, build-windows, build-mac]
158+
needs: [test, build-linux, build-windows, build-mac]
128159
steps:
129160
- name: Checkout
130161
uses: actions/checkout@v4
@@ -138,7 +169,7 @@ jobs:
138169
run: |
139170
pip install --upgrade pip
140171
pip install twine
141-
172+
142173
- name: Download all artifacts to a specific directory
143174
uses: actions/download-artifact@v3
144175
with:
@@ -148,8 +179,8 @@ jobs:
148179
run: |
149180
ls -R dist
150181
151-
# - name: Upload to PyPI using twine
152-
# run: twine upload --skip-existing wheelhouse/*
153-
# env:
154-
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
155-
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
182+
- name: Upload to PyPI using twine
183+
run: twine upload --skip-existing wheelhouse/*
184+
env:
185+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
186+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/test.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)