Skip to content

CI prep for release #124

CI prep for release

CI prep for release #124

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test_pyfdl:
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
python-version: ["3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pypa/hatch@install
- run: hatch test -py ${{ matrix.python-version }}
build_package:
needs: test_pyfdl
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: pypa/hatch@install
name: Build packages
- run: hatch build -c -t sdist -t wheel
upload_artifacts:
needs: build_package
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/upload-artifact@v4
name: Upload wheel
with:
name: wheel
path: dist/pyfdl-*.whl
- uses: actions/upload-artifact@v4
name: Upload sdist
with:
name: sdist
path: sdist/pyfdl-*.tar.gz