-
Notifications
You must be signed in to change notification settings - Fork 8
78 lines (69 loc) · 2.52 KB
/
run_tests.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Run tests
on:
schedule:
- cron: '0 5 * * *' # once per day at midnight ET
push:
workflow_dispatch:
jobs:
run-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { name: linux-python3.8 , os: ubuntu-latest , python-ver: "3.8" }
- { name: linux-python3.11 , os: ubuntu-latest , python-ver: "3.11" }
- { name: linux-python3.12 , os: ubuntu-latest , python-ver: "3.12" }
- { name: windows-python3.8 , os: windows-latest , python-ver: "3.8" }
- { name: windows-python3.9 , os: windows-latest , python-ver: "3.9" }
- { name: windows-python3.10 , os: windows-latest , python-ver: "3.10" }
- { name: windows-python3.11 , os: windows-latest , python-ver: "3.11" }
- { name: windows-python3.12 , os: windows-latest , python-ver: "3.12" }
- { name: macos-python3.8 , os: macos-latest , python-ver: "3.8" }
- { name: macos-python3.11 , os: macos-latest , python-ver: "3.11" }
- { name: macos-python3.12 , os: macos-latest , python-ver: "3.12" }
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-ver }}
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cookiecutter pynwb hdmf-docutils
python -m pip list
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
- name: Run template tests
run: |
python -m pip install pytest pytest-cookies
pytest tests
- name: Evaluate template from local source
run: |
cookiecutter -v --no-input --output-dir ./out .
- name: Check generated files
run: |
python tests/test_bake_project.py ./out/ndx-my-namespace/ ndx-my-namespace
- name: Run PyNWB tests from generated extension
run: |
cd ./out/ndx-my-namespace
python -m pip install -r requirements-dev.txt
python -m pip install .
pytest
- name: Build documentation from generated extension
run: |
set -e
cd ./out/ndx-my-namespace/docs
make apidoc
make html