Skip to content

Commit

Permalink
CI: new Github Actions pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Dec 4, 2020
1 parent 13336e8 commit e2561fa
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
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

0 comments on commit e2561fa

Please sign in to comment.