Skip to content

Commit 98e536e

Browse files
authored
Fix GitHub actions (#1)
1 parent 3b3b251 commit 98e536e

File tree

2 files changed

+67
-66
lines changed

2 files changed

+67
-66
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
41
name: Publish to PyPI
52

63
on:
@@ -9,43 +6,49 @@ on:
96

107
jobs:
118
build:
12-
139
runs-on: ubuntu-latest
1410

1511
steps:
16-
- uses: actions/checkout@v4
17-
- name: Set up Python 3.11
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version: 3.11
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install flake8 pytest tox
25-
# - name: Lint with flake8
26-
# run: |
27-
# # stop the build if there are Python syntax errors or undefined names
28-
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
30-
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31-
- name: Test with tox
32-
run: |
33-
tox
34-
- name: Build docs
35-
run: |
36-
tox -e docs
37-
- run: touch ./docs/_build/html/.nojekyll
38-
- name: GH Pages Deployment
39-
uses: JamesIves/github-pages-deploy-action@4.1.3
40-
with:
41-
branch: gh-pages # The branch the action should deploy to.
42-
folder: ./docs/_build/html
43-
clean: true # Automatically remove deleted files from the deploy branch
44-
- name: Build Project and Publish
45-
run: |
46-
python -m tox -e clean,build
47-
- name: Publish package
48-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
49-
with:
50-
user: __token__
51-
password: ${{ secrets.PYPI_PASSWORD }}
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Python 3.11
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: 3.11
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install flake8 pytest tox
23+
24+
- name: Setup git creds
25+
run: |
26+
git config --global user.email "gituser@biocpy"
27+
git config --global user.name "Biocpy test user"
28+
29+
- name: Test with tox
30+
run: |
31+
tox
32+
33+
- name: Build docs
34+
run: |
35+
tox -e docs
36+
37+
- run: touch ./docs/_build/html/.nojekyll
38+
39+
- name: GH Pages Deployment
40+
uses: JamesIves/github-pages-deploy-action@4.1.3
41+
with:
42+
branch: gh-pages # The branch the action should deploy to.
43+
folder: ./docs/_build/html
44+
clean: true # Automatically remove deleted files from the deploy branch
45+
46+
- name: Build Project and Publish
47+
run: |
48+
python -m tox -e clean,build
49+
50+
- name: Publish package
51+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
52+
with:
53+
user: __token__
54+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/pypi-test.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
41
name: Test the library
52

63
on:
74
push:
8-
branches: [ master ]
5+
branches: [master]
96
pull_request:
10-
branches: [ master ]
7+
branches: [master]
118

129
jobs:
1310
build:
14-
1511
runs-on: ubuntu-latest
1612
strategy:
1713
matrix:
18-
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1915

2016
name: Python ${{ matrix.python-version }}
2117
steps:
22-
- uses: actions/checkout@v4
23-
- name: Setup Python
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
cache: 'pip'
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install --upgrade pip
31-
pip install flake8 pytest tox
32-
# - name: Lint with flake8
33-
# run: |
34-
# # stop the build if there are Python syntax errors or undefined names
35-
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38-
- name: Test with tox
39-
run: |
40-
tox
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup git creds
21+
run: |
22+
git config --global user.email "gituser@biocpy"
23+
git config --global user.name "Biocpy test user"
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
cache: "pip"
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install flake8 pytest tox
35+
36+
- name: Test with tox
37+
run: |
38+
tox

0 commit comments

Comments
 (0)