-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With Hatch as the new build system, the previous GitHub actions no longer work to lint, test, and publish the package. This commit makes use of pypa/cibuildwheel to build the package for multiple platforms, and then publishes the package to PyPI using the existing secrets. Signed-off-by: JP-Ellis <[email protected]>
- Loading branch information
Showing
3 changed files
with
61 additions
and
81 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
STABLE_PYTHON_VERSION: "3.11" | ||
|
||
jobs: | ||
run: | ||
name: >- | ||
Python ${{ matrix.python-version }} | ||
on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
experimental: [false] | ||
include: | ||
- # Run tests against the next Python version, but no need for the full list of OSes. | ||
os: ubuntu-latest | ||
python-version: "3.12-dev" | ||
experimental: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Hatch | ||
run: pip install --upgrade hatch | ||
|
||
- # TODO: Fix lints before enabling this | ||
name: Lint | ||
if: matrix.python-version == env.STABLE_PYTHON_VERSION && runner.os == 'Linux' | ||
run: echo hatch run lint | ||
|
||
- # TODO: Implement the examples to work in hatch | ||
name: Examples | ||
if: matrix.python-version == env.STABLE_PYTHON_VERSION && runner.os == 'Linux' | ||
run: echo hatch run example | ||
|
||
- name: Run tests and track code coverage | ||
run: hatch run test |