-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (41 loc) · 1.17 KB
/
python-package.yml
File metadata and controls
43 lines (41 loc) · 1.17 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
41
42
43
name: Python Package
on: [ push, pull_request ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
max-parallel: 5
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install package
run: |
pip install -e .[test]
- name: Lint with flake8
run: |
flake8 battdat/ tests
- name: Test with pytest
run: |
pytest --cov=batdata tests
- name: Coveralls
run: |
pip install coveralls
coveralls --service=github-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Test example notebooks
if: ${{ runner.os == 'Linux' }}
run: |
pip install jupyter matplotlib
home_dir=`pwd`
for notebook in `find . -name "*.ipynb"`; do
cd `dirname $notebook`
jupyter execute `basename $notebook`
cd $home_dir
done