1.2.1 #14
Workflow file for this run
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: "Test, Build, Publish" | |
on: | |
workflow_dispatch: | |
push: | |
release: | |
types: | |
- published | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install sound libraries | |
run: | | |
sudo apt-get install libsndfile1 libvorbis0a pulseaudio | |
pulseaudio -D --start | |
- name: Install xvfb | |
run: | | |
sudo apt-get install xvfb | |
- name: Run tests under xvfb | |
run: | | |
xvfb-run --auto-servernum python setup.py test | |
- name: Cleanup xvfb pidx | |
uses: bcomnes/cleanup-xvfb@v1 | |
- uses: actions/upload-artifact@master | |
if: ${{ failure() }} | |
with: | |
name: failed-image | |
path: test/failed-image | |
buildpackage: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install wheel and SDist requirements | |
run: python -m pip install "setuptools>=42.0" wheel twine | |
- name: Build SDist | |
run: python setup.py sdist bdist_wheel | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: | | |
dist/*.tar.gz | |
dist/*.whl | |
publish: | |
needs: [buildpackage] | |
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 }} |