Skip to content

Commit

Permalink
tox gh extension is no good
Browse files Browse the repository at this point in the history
  • Loading branch information
jtisbell4 committed Apr 25, 2024
1 parent 09db68c commit ee09bd5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 45 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,35 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
config:
- py: '3.8'
dbr: dbr91
- py: '3.8'
dbr: dbr104
- py: '3.9'
dbr: dbr113
- py: '3.9'
dbr: dbr122
- py: '3.10'
dbr: dbr133
- py: '3.10'
dbr: dbr143
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.config.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.config.py }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh
python -m pip install tox
- name: Execute tox envs
working-directory: ./python
run: tox
run: tox -e ${{ matrix.config.dbr }} coverage-report
- name: Publish test coverage
uses: codecov/codecov-action@v4
with:
Expand Down
50 changes: 16 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: release
name: build-release

on:
pull_request:
types: [opened, synchronize]
push:
# tags:
# - 'v*' # only release a versioned tag, such as v.X.Y.Z
branches: ['*']

jobs:
Expand All @@ -20,15 +20,6 @@ jobs:
with:
python-version: '3.10'

# - uses: actions/cache@v2
# id: cache
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# ${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -38,13 +29,13 @@ jobs:
working-directory: ./python
run: tox -e build-dist

# - name: Publish a Python distribution to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# if: $${{ github.ref }} == 'refs/heads/master'
# with:
# user: __token__
# password: ${{ secrets.LABS_PYPI_TOKEN }}
# packages_dir: python/dist/
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/v')
with:
user: __token__
password: ${{ secrets.LABS_PYPI_TOKEN }}
packages_dir: python/dist/

docs:
runs-on: ubuntu-latest
Expand All @@ -59,15 +50,6 @@ jobs:
with:
python-version: '3.9'

# - uses: actions/cache@v2
# id: cache
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# ${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -83,9 +65,9 @@ jobs:
name: html-docs
path: docs/_build/html/

# - name: Deploy 🚀
# uses: peaceiris/actions-gh-pages@v3
# if: $${{ github.ref }} == 'refs/heads/master'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/_build/html
- name: Deploy 🚀
uses: peaceiris/actions-gh-pages@v3
if: startsWith(github.ref, 'refs/tags/v')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
6 changes: 0 additions & 6 deletions python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ envlist =
coverage-report
skip_missing_interpreters = true

[gh]
python =
3.8 = dbr91, dbr104
3.9 = dbr113, dbr122
3.10 = dbr133, dbr143

[testenv]
description = run the tests under {envname}
package = wheel
Expand Down

0 comments on commit ee09bd5

Please sign in to comment.