-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Travis with GitHub actions and use Poetry.
The Python ecosystem has moved on a bit since I last touched this project. It no longer makes sense to support Python 2 and type hints are becoming more common. This is the first commit towards that.
- Loading branch information
Showing
12 changed files
with
708 additions
and
736 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,73 @@ | ||
name: CI | ||
|
||
on: | ||
# This avoids having duplicate builds for a pull request | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
os: ["ubuntu-latest"] | ||
runs-on: ${{ matrix.os }} | ||
name: Pytest (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2.0.0 | ||
with: | ||
poetry-version: 1.1.13 | ||
# Remove the lock file unless we're using the stable version of Python. | ||
# This is required because older Python version require "polyfills" for | ||
# some libraries | ||
- name: Remove poetry.lock file | ||
run: rm poetry.lock | ||
if: ${{ matrix.python-version != '3.10' }} | ||
- name: Install dev dependencies | ||
run: poetry install | ||
- name: Run pytest | ||
run: poetry run pytest | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
name: Documentation | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10 | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2.0.0 | ||
with: | ||
poetry-version: 1.1.13 | ||
- name: Install dev dependencies | ||
run: poetry install | ||
- name: Build documentation | ||
run: | | ||
poetry run sphinx-build -b html doc doc-build | ||
touch doc-build/.nojekyll | ||
- name: Deploy | ||
uses: crazy-max/ghaction-github-pages@v3 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
allow_empty_commit: false | ||
build_dir: doc-build/ | ||
committer_name: Andreas Runfalk | ||
committer_email: andreas@runfalk.se | ||
keep_history: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.