Skip to content

Commit

Permalink
template repo created
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed Feb 27, 2024
0 parents commit 7f2b314
Show file tree
Hide file tree
Showing 32 changed files with 4,006 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: myenv
environment-file: environment.yml
auto-activate-base: false
- run: |
conda info
conda list
- name: Activate Conda Environment
run: |
conda init
source /home/runner/.bashrc
conda activate /usr/share/miniconda/envs/myenv
conda info --envs
- name: Install Doxygen
run: /usr/share/miniconda/envs/myenv/bin/doxygen --version
shell: bash
- name: Test with pytest
run: pytest .
- name: Generate Doxygen Documentation
run: cd docs &&
mkdir build &&
mkdir build/doxygen &&
/usr/share/miniconda/envs/myenv/bin/doxygen doxygen/doxygen.dox
shell: bash
- name: Build docs
run: |
cd docs && make html
- name: Archive build artifacts (i.e. documentation)
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/

publish:
needs: build
# Only publish documentation when merging into `origin/main`.`
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'yoctoyotta1024'"
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download build artifacts (i.e. documentation)
uses: actions/download-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Publish docs on github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pre-commit

on: pull_request

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Python setup
uses: actions/setup-python@v3

- name: Pre-commit run
uses: pre-commit/[email protected]
Loading

0 comments on commit 7f2b314

Please sign in to comment.