migrate to newer numpy #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tricolour build CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8"] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip and setuptools | |
run: python -m pip install -U pip setuptools | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Testing | |
run: python -m pip install .[testing] | |
- name: Run base test | |
run: py.test -s -vvv --flake8 tricolour/ | |
deploy: | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name == 'push' && | |
(startsWith(github.event.ref, 'refs/tags') || | |
github.event.ref == 'refs/heads/master') | |
steps: | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Upgrade pip, setuptools and wheels | |
run: python -m pip install -U pip setuptools wheel | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Build distributions | |
run: python setup.py sdist bdist_wheel | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.test_pypi_token }} | |
repository_url: https://test.pypi.org/legacy/ | |
continue-on-error: true | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_token }} |