[misc] Add github action for documentation and backend
This commit is contained in:
parent
11050cf665
commit
5c458ccd41
25
.github/workflows/backend.yml
vendored
Normal file
25
.github/workflows/backend.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Python package
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
|
||||
steps:
|
||||
- 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: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pytest flake8
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
40
.github/workflows/documentation.yml
vendored
Normal file
40
.github/workflows/documentation.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Documentation
|
||||
|
||||
env:
|
||||
packageName: 'kibicara'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
release:
|
||||
types: [published, created, edited]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
|
||||
steps:
|
||||
- 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: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pdoc3
|
||||
- name: Build documentation with pydoc3
|
||||
run: |
|
||||
pdoc -f -o build --html ${{ env.packageName }}
|
||||
- name: Deploy documentation onto gh-pages
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages # The branch the action should deploy to.
|
||||
FOLDER: build/${{ env.packageName }} # The folder the action should deploy.
|
||||
CLEAN: true
|
Loading…
Reference in a new issue