Adding docs build, project build, and tox CI workflows
This commit is contained in:
parent
3fc02e0321
commit
25e39d3544
17
.riahub/workflows/build-docs.yaml
Normal file
17
.riahub/workflows/build-docs.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
name: Build Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ammaraskar/sphinx-action@0.4
|
||||
with:
|
||||
docs-folder: "docs/"
|
||||
pre-build-command: pip install -U sphinx sphinx-rtd-theme
|
50
.riahub/workflows/build-project.yaml
Normal file
50
.riahub/workflows/build-project.yaml
Normal file
|
@ -0,0 +1,50 @@
|
|||
name: Build Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
project-build-check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.10', '3.11', '3.12' ]
|
||||
|
||||
name: Build Project
|
||||
steps:
|
||||
- name: Check out project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build project
|
||||
run: |
|
||||
poetry build
|
||||
|
||||
- name: Set up Python environment
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Create Python virtual environment
|
||||
run: |
|
||||
python -m venv .venv
|
||||
|
||||
- name: Install project in virtual environment
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pip install dist/*.whl
|
||||
|
||||
# In the following step, 'pip list' prints out a list of installed dependencies. This is not required for the
|
||||
# build but useful for debugging.
|
||||
- name: Check dependency installation
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pip check
|
||||
pip list
|
||||
|
||||
- name: Very project import
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
python -c "import ria_toolkit"
|
32
.riahub/workflows/tox.yaml
Normal file
32
.riahub/workflows/tox.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Test with tox
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10', '3.11', '3.12']
|
||||
name: Test with tox
|
||||
steps:
|
||||
- name: Check out project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install tox-gh-actions
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install tox tox-gh-actions
|
||||
|
||||
- name: Test with tox
|
||||
run: |
|
||||
tox
|
Loading…
Reference in New Issue
Block a user