Skip to content

Add tox

Add tox #17

Workflow file for this run

name: Build
on:
push:
# workflow_dispatch:
pull_request:
branches:
- master
release:
types:
- created
schedule:
- cron: "0 7 * * 1"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["cp37", "cp38", "cp39", "cp310", "cp311"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install tox
run: |
pip install --upgrade pip
pip install tox
- name: Run linting
run: |
tox
# TODO:
# publish this if merged to master or a tag
build_wheels:
needs: test
name: Build wheels on ${{ matrix.buildplat[0] }} / ${{ matrix.buildplat[1] }} for ${{ matrix.python }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
matrix:
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, musllinux_x86_64]
- [macos-12, macosx_*]
- [windows-2019, win_amd64]
- [windows-2019, win32]
python: ["cp37", "cp38", "cp39", "cp310", "cp311"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git status && git tag --list && pwd
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
path: ./wheelhouse/*.whl
# docs-deploy
publish:
runs-on: ubuntu-latest
needs:
- build_wheels
- docker

Check failure on line 75 in .github/workflows/wheels.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/wheels.yml (Line: 75, Col: 9): Job 'publish' depends on unknown job 'docker'.
steps:
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish artifacts
env:
TWINE_USERNAME: secrets.TWINE_USERNAME
TWINE_PASSWORD: secrets.TWINE_PASSWORD
TWINE_REPOSITORY_URL: secrets.TWINE_REPOSITORY_URL
shell: bash
working-directory: artifacts
run: |
ls -alR
for i in $( ls ); do
cat $i/$ARTIFACT
done