Skip to content

Commit 5a905ce

Browse files
authored
Create main.yml
1 parent bf25117 commit 5a905ce

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: [3.8]
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v1
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install dependencies
34+
run: |
35+
sudo apt-get install -y tor
36+
python3 -m pip install --upgrade pip
37+
pip3 install flake8 flake8-nb
38+
pip3 install -r binder/requirements.txt
39+
40+
- name: Lint with flake8
41+
run: |
42+
# stop the build if there are Python syntax errors or undefined names
43+
flake8-nb . --count --select=E9,F63,F7,F82 --show-source --statistics
44+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
45+
flake8-nb . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
46+
47+
- name: Run all the notebooks using nbconvert
48+
run: |
49+
python3 binder/test_notebooks.py notes

0 commit comments

Comments
 (0)