-
Notifications
You must be signed in to change notification settings - Fork 67
40 lines (35 loc) · 1.07 KB
/
test_notebooks.yml
File metadata and controls
40 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test notebooks
on: [push]
env:
API_NYT: ${{ secrets.API_NYT }}
FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
WRDS_USER: ${{ secrets.WRDS_USER }}
WRDS_PASS: ${{ secrets.WRDS_PASS }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest nbmake
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest/nbmake
run: |
pytest --nbmake notebooks/*.ipynb
- name: Enforce clean notebooks
uses: ResearchSoftwareActions/EnsureCleanNotebooksAction@1.1
- name: Check black formatting
uses: psf/black@stable
with:
options: "--check --verbose"
src: "./notebooks"
jupyter: true