Skip to content

Make Conda instructions a bit clearer #566

Make Conda instructions a bit clearer

Make Conda instructions a bit clearer #566

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
# Run for PRs only if they come from a forked repo (avoids duplicate runs)
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
toxenv: [flake8, mypy, docs, black]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Run tox ${{ matrix.toxenv }}
run: tox -e ${{ matrix.toxenv }}
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # required for setuptools_scm
- name: Build sdist and temporary wheel
run: pipx run build
- uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*.tar.gz
test:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: macos-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.10"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Test
run: tox -e py$(echo ${{ matrix.python-version }} | tr -d .)
- name: Upload coverage report
uses: codecov/codecov-action@v3
wheels:
if: github.event_name == 'push' && github.ref_type == 'tag'
needs: [lint, build, test]
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # required for setuptools_scm
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp*-manylinux_x86_64 cp3*-win_amd64 cp3*-macosx_x86_64"
CIBW_SKIP: "cp37-*"
- uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse/*.whl
publish:
if: github.event_name == 'push' && github.ref_type == 'tag'
needs: [build, wheels]
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: sdist
path: dist/
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist/
- name: Publish alpha release to test PyPI
if: contains(github.ref_name, 'a')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/
- name: Publish to PyPI
if: "!contains(github.ref_name, '.dev') && !contains(github.ref_name, 'a')"
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}