Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 23 additions & 13 deletions .github/workflows/build-publish.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build Python Package
name: Build & Test Python Package

on:
push:
branches:
- main
- '**'
tags-ignore:
- 'v*.*.*'
paths:
Expand All @@ -20,9 +19,8 @@ on:
- pyproject.toml

jobs:
build:
code-quality:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -40,21 +38,33 @@ jobs:
- name: Lint with Ruff
run: ruff check .

test-build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Build Dependencies
run: |
python -m pip install --upgrade pip
pip install build ruff pytest

- name: Build Package
run: python -m build

- name: Test CLI Command
run: |
pip install .
testdoc --help

- name: Run Unit Tests
run: pytest atest/

# - name: Publish to TestPyPI
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
# run: |
# pip install twine
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*

9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,12 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

# Backup:
# - name: Publish to TestPyPI
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
# run: |
# pip install twine
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
# "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down