Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add github workflow for build and pushing docs #201

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docs
on:
push:
branches:
- main
- sphinx
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0

- name: Start Slurm Container
uses: sudo-bot/action-docker-compose@latest
with:
cli-args: "-f docker-compose-github.yml up -d"
env:
PYTHON: "3.9"

- name: Build PySlurm
run: |
docker exec slurmctl python3.9 -m pip install Cython
docker exec slurmctl python3.9 setup.py build
docker exec slurmctl python3.9 setup.py install

- name: Install Sphinx
run: |

- name: Build Docs
run: |
docker exec slurmctl python3.9 -m pip install sphinx pydata_sphinx_theme
docker exec slurmctl make -C docs html

# - name: Build Docs and Commit
# uses: sphinx-notes/pages@master
# with:
# documentation_path: docs/source

# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: gh-pages
5 changes: 5 additions & 0 deletions .github/workflows/pyslurm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,27 @@ jobs:
steps:
- name: Checkout repository code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
which python
which python${{ matrix.python-version }}
python${{ matrix.python-version }} -m pip install --upgrade pip
python${{ matrix.python-verison }} -m pip install pipenv
pipenv --python ${{matrix.python-version }} install --dev --skip-lock

- name: Start Slurm Container
uses: sudo-bot/action-docker-compose@latest
with:
cli-args: "-f docker-compose-github.yml up -d"
env:
PYTHON: ${{ matrix.python-version }}

- name: Debug
run: |
docker ps -a
Expand All @@ -39,6 +43,7 @@ jobs:
ls -al
docker inspect slurmctl
env | sort

- name: Build/Install/Test PySlurm
run: |
pipenv run pytest -sv scripts/run_tests_in_container.py
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build/

# Ignore Docs Directory #
#doc/
#docs/

# Ignore Temporary Build Files #
pyslurm/pyslurm.c
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ name = "pypi"

[packages]
cython = "*"
sphinx = "*"
pydata-sphinx-theme = "*"

[dev-packages]
black = "*"
Expand Down
273 changes: 272 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading