Skip to content

Commit 0db8e37

Browse files
Add CI for tests and CD for docs deployment
- Added `.github/workflows/ci.yml` to run tests on Python 3.10 and 3.11. - Added `.github/workflows/deploy-docs.yml` to deploy mkdocs to gh-pages. - Updated `pyproject.toml` to include `mkdocs-material` dependency. - Updated `mkdocs.yml` to use `material` theme. - Added `site/` to `.gitignore`.
1 parent c3b302a commit 0db8e37

35 files changed

Lines changed: 60 additions & 5018 deletions

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install .
30+
31+
- name: Run tests
32+
run: |
33+
python -m unittest discover -s tests

.github/workflows/deploy-docs.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.x
19+
- name: Install dependencies
20+
run: |
21+
pip install .
22+
- name: Deploy
23+
run: mkdocs gh-deploy --force

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,4 @@ example/binary_collections/*
7171

7272
# symlinked schema
7373
*/.ndi
74+
site/

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
site_name: NDI-python
2+
theme:
3+
name: material
24
nav:
35
- Home: index.md
46
- Cache: cache.md

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ classifiers = [
1919
dependencies = [
2020
"did @ git+https://github.com/VH-Lab/DID-python.git@main",
2121
"mkdocs",
22+
"mkdocs-material",
2223
"pandas",
2324
"requests",
2425
"ndi-compress @ git+https://github.com/Waltham-Data-Science/NDI-compress-python",

site/404.html

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
 (0)