-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13336e8
commit e2561fa
Showing
1 changed file
with
55 additions
and
0 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,55 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v2 | ||
if: startsWith(runner.os, 'Linux') | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- uses: actions/cache@v2 | ||
if: startsWith(runner.os, 'macOS') | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- uses: actions/cache@v2 | ||
if: startsWith(runner.os, 'Windows') | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
# Note the use of the -Wa flag to show DeprecationWarnings | ||
- name: Unit tests | ||
run: | | ||
python -Wa -m unittest discover --verbose | ||
- name: Build documentation | ||
run: | | ||
pip install -r dev-requivements.txt | ||
python setup.py build_sphinx |