Skip to content

Commit

Permalink
Fixin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abkfenris committed Oct 12, 2023
1 parent 31d194e commit 5bea317
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 45 deletions.
90 changes: 48 additions & 42 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish to PyPI

# https://github.com/pypa/gh-action-pypi-publish
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
on:
pull_request:
push:
Expand All @@ -8,46 +8,52 @@ on:
release:
types:
- published

jobs:
packages:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
shell: bash

- name: Install build tools
run: |
python -m pip install --upgrade pip build
shell: bash

- name: Build binary wheel
run: python -m build --sdist --wheel . --outdir dist

- name: CheckFiles
run: |
ls dist
shell: bash

- name: Test wheels
run: |
cd dist && python -m pip install *.whl
python -m pip install --upgrade twine
python -m twine check *
shell: bash

- name: Publish a Python distribution to PyPI
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

# - name: Get tags
# run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Install build tools
run: |
python -m pip install --upgrade build
- name: Build binary wheel
run: python -m build --sdist --wheel . --outdir dist

- name: CheckFiles
run: >
ls dist
&& python -m pip install --upgrade check-manifest
&& check-manifest --verbose
- name: Test wheels
run: >
cd dist
&& python -m pip install *.whl
&& python -m pip install --upgrade build twine
&& python -m twine check *
# Skipping Test PyPI due to issues with setuptools_scm
# see https://github.com/xpublish-community/xpublish-opendap/issues/10
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/

- name: Publish a Python distribution to PyPI
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ license = {file = "LICENSE.txt"}
authors = [
{name = "Alex Kerney", email = "[email protected]"},
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
black
check-manifest
httpx
interrogate
jupyter
myst-parser
Expand Down

0 comments on commit 5bea317

Please sign in to comment.