Skip to content

Commit

Permalink
added first version of github actions to handle tests and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jhcepas committed Sep 19, 2023
1 parent 78b3236 commit aba50dd
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Pipeline

on:
push:
branches:
- '*'
- '!gh-pages' # excludes master

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checkout the latest code
- name: Checkout Code
uses: actions/checkout@v2

# Setup Python environment
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

# Install dependencies for your project
- name: Install Dependencies
run: |
pip install .[test]
pip install sphinx
# Run tests
- name: Run Tests
run: |
cd tests
pytest \
test_arraytable.py test_clustertree.py test_gtdbquery.py \
test_interop.py test_phylotree.py test_seqgroup.py test_tree.py \
test_treediff.py test_orthologs_group_delineation.py test_ncbiquery.py \
test_nexus.py test_treematcher.py \
test_treeview/test_all_treeview.py
# Build Sphinx documentation
- name: Generate Sphinx Documentation
run: |
cd doc
make html
39 changes: 39 additions & 0 deletions .github/workflows/update_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Update github pages docs

on:
push:
branches:
- online_docs

jobs:
build:
runs-on: ubuntu-latest

steps:
# Checkout the latest code
- name: Checkout Code
uses: actions/checkout@v2

# Setup Python environment
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

# Install dependencies for your project
- name: Install Dependencies
run: |
pip install .
pip install sphinx
# Build Sphinx documentation
- name: Generate Sphinx Documentation
run: |
cd doc
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/_build

0 comments on commit aba50dd

Please sign in to comment.