Skip to content

Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.9.0 (#170) #72

Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.9.0 (#170)

Bump pypa/gh-action-pypi-publish from 1.8.10 to 1.9.0 (#170) #72

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types:
- published
jobs:
tests:
name: "py${{ matrix.python-version }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
include:
- python-version: "3.10"
os: macos-latest
- python-version: "3.10"
os: windows-latest
steps:
- name: Clone the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip pytest
python -m pip install .
- name: Run tests
run: python -m pytest -v tests
coverage:
name: "Run tests with coverage"
runs-on: ubuntu-latest
steps:
- name: Clone the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install -U pip pytest-cov
python -m pip install -e .
- name: Run tests
run: python -m pytest --cov george -v tests
- name: Coveralls
uses: AndreMiras/coveralls-python-action@v20201129
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: pypa/[email protected]
env:
CIBW_SKIP: "*-win32 *_i686"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.9"
- name: Build sdist
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build --sdist .
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [tests, build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/