-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from melexis/move-to-gh-actions
Move from Travis CI to GitHub Actions
- Loading branch information
Showing
5 changed files
with
92 additions
and
71 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Test and deploy on tag | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Build documentation with Sphinx 2.1 | ||
run: tox -e sphinx-latest | ||
- name: Build documentation with latest Sphinx versions | ||
run: tox -e sphinx-latest | ||
- name: Static checks | ||
if: matrix.python-version == 3.9 | ||
run: tox -e check | ||
- name: Upload HTML documentation | ||
if: matrix.python-version == 3.9 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: html-doc | ||
path: doc/_build/html | ||
|
||
deploy: | ||
|
||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download HTML documentation from job 'test' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: html-doc | ||
path: doc/_build/html | ||
- name: Disable jekyll | ||
run: touch doc/_build/html/.nojekyll | ||
- name: Deploy documentation | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: doc/_build/html | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[metadata] | ||
description-file = README.rst | ||
description_file = README.rst | ||
|
||
[bdist_wheel] | ||
universal=1 | ||
|
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
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