-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Travis to GitHub Actions
Signed-off-by: Stephen Finucane <stephen@that.guru>
- Loading branch information
1 parent
9985d6e
commit 31d2857
Showing
4 changed files
with
91 additions
and
37 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,88 @@ | ||
--- | ||
name: CI | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
lint: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: python -m pip install tox | ||
- name: Run tox | ||
run: tox -e style | ||
test: | ||
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
# We need history to build the package | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: python -m pip install tox | ||
- name: Run unit tests (via tox) | ||
# Run tox using the version of Python in `PATH` | ||
run: tox -e py | ||
docs: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
# We need history for release notes | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: python -m pip install tox | ||
- name: Build docs (via tox) | ||
run: tox -e docs | ||
- name: Archive build results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: html-docs-build | ||
path: docs/_build/html | ||
retention-days: 7 | ||
release: | ||
name: Upload release artifacts | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
# We need history to build the package | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: python -m pip install build | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m build --sdist --wheel --outdir dist/ . | ||
- name: Publish distribution to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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
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