Skip to content

CI: Fix Windows builds #33

CI: Fix Windows builds

CI: Fix Windows builds #33

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
release:
types:
- published
jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install wheel and SDist requirements
run: python -m pip install "setuptools>=42.0" wheel
- name: Build packages
run: python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v3
with:
path: |
dist/*.tar.gz
dist/*.whl
test:
name: Run tests with ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Install package and dependencies
run: |
python -m pip install pip-tools
python -m piptools sync requirements_dev.txt
python -m pip install -e .
- name: Run pytest
run: pytest
working-directory: tests
publish:
needs: [dist, test]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}