CI #142
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
on: | |
# Trigger the workflow on push or | |
# pull request, but only for the | |
# master branch. | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
# Weekly run to account for | |
# changed dependencies. | |
schedule: | |
- cron: '17 03 * * 0' | |
name: CI | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: | |
- '3.8' | |
- '3.9' | |
include: | |
- os: ubuntu-20.04 | |
python-version: '3.8' | |
installTyping: ${{ true }} | |
fail-fast: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: v1-pip-${{ runner.os }}-${{ matrix.python-version }} | |
restore-keys: | | |
v1-pip-${{ runner.os }} | |
v1-pip- | |
#- name: Lint | |
# run: python -m flake8 | |
- name: Build the code and Install dependencies | |
run: pip install -e .[dev,components,widgets] | |
- name: Run tests | |
run: python -m pytest -v |