Initial commit

This commit is contained in:
Kevo 2022-01-23 11:14:52 +01:00
commit fc8cc85a04
14 changed files with 321 additions and 0 deletions

View file

@ -0,0 +1,38 @@
name: Build documentation
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10]
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 pdoc
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build docs
run: |
chmod +x ./scripts/build_documentation.sh
bash ./scripts/build_documentation.sh
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: documentation
folder: ./documentation

38
.github/workflows/publish_to_pypi.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: Upload Python Package to PyPI
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '^3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pyTest
run: |
python -m pytest -v
- name: Build package
run: |
chmod +x ./scripts/compile_for_pypi.sh
./scripts/compile_for_pypi.sh
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

25
.github/workflows/pytest.yml vendored Normal file
View file

@ -0,0 +1,25 @@
name: Test with pyTest
on: [workflow_dispatch, push, pull_request]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '^3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pyTest
run: |
python -m pytest -v