mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 08:33:54 +02:00
(chore): Initilised devops tools (#29)
* Added a first action * Repaired a typo * Repaired a typo2 * Repaired a typo2 * Added flake8 action * Repaired a typo in the flake8 action. * Added a first bandit action * Added a first batch * Added a first batch * Added a first batch * Added a first batch * Added a first batch * Added the flake8-prebuild as a need to flake8 * Added the flake8-prebuild as a need to flake8 * Added the flake8-prebuild as a need to flake8 * Added the docker socket to the volume. * Added the flake8-prebuild as a need to flake8 * Removed latest part from container. * Removed latest part from container. * Removed latest part from container. * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 * Reworked flake8 poetry * Reworked flake8 poetry * Changed to 64bit * Some edits to the runner * Added python setup * Added python -m to python docker image. * Added python -m to python docker image. * Added python -m to python docker image. * Added python -m to python docker image. * Added python -m to python docker image. * Added python -m to python docker image. * Added ra run linter * Added ra run linter * Added ra run linter * Added ra run linter * Removed redundant version * Removed redundant version * Added isort * Added isort * Added isort * Added poetry install * Added poetry install * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Uses nodejs and python image * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Added flake8 as lint. * Removed selfhosted runner * Removed self hosted runner * Removed self hosted runner * Removed self hosted runner * Added black and flake8 tests * Removed self hosted runner * Removed self hosted runner * Removed unneded actions * Added a mypy error. * Removed poetry call before boetry setup * Removed poetry call before poetry setup * Added a test to understand the poetry action better * Added a test to understand the poetry action better * Added a test to understand the poetry action better * Added a test to understand the poetry action better * Added a test to understand the poetry action better * Added a test to understand the poetry action better * Added the snook poetry builder * Reworked the repo a bit * Removed unneeded poetry installation * Added the isort action * Added isort test * Added ruff * Added full ruff configuration * Added full ruff configuration2 * Added full ruff configuration2 * Removed duplicat configurations * Removed some redundant pre-commit hooks * Removed unneeded actions. * Removed unneeded actions. * Repaired ruff * Added tests. * Removed * Removed * Removed a missing file * Removed a missing file * Removed a missing file * Removed a missing file * Removed a missing file * Added reports as artifacts * Added reports as artifacts * Added reports as artifacts * Removed the unneded poetry test * Added a license checker. * Added a license checker. * Removed some unneeded configuration. * Removed the import reformatted. * Added doc generation. * Added doc generation. * Added license summary. * Add * Add lint * Switched pip-licenses to poetry. * Switched pip-licenses to poetry. * Switched pip-licenses to poetry. * Remove some more packages. * Remove some more packages. * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added a make file * Added version codes to the main package * Changed the format of the md files * Presentation first draft * Version up and added extensions * Version up and added extensions * Version up and added extensions * Removed the venv path from docbuild * Actions version up * Actions version up * Actions version up * Actions version up * Actions version up * Actions version up * Experiements with sphinx * Experiments with sphinx * Experiments with sphinx * Experiments with sphinx * Experiments with sphinx * Experiments with sphinx * Experiments with sphinx * Experiments with sphinx * First draft of the sphinx documentation. * Added the protocol to the time series. * Added the protocol to the time series. * First draft ot a first build pipline * Added mermaid version support * Added documentations pull and branch request requirements. * Added documentations pull and branch request requirements. * Added documentations pull and branch request requirements. * Added documentations pull and branch request requirements. * Tests should now be passing * Tests should now be passing * Tests should now be passing * Tests should now be passing * Tests should now be passing * Tests should now be passing * Tests should now be passing * Tests should now be passing * Add safety * Add safety * Add safety * Added the action on pull_request_target * Added the action on pull_request_target * Added the action on pull_request_target * Added a pytest coverage report * Added a pytest coverage report * Added a pytest coverage report * Added a pytest coverage report * Added a pytest coverage report * Added a build step * Added a build step * Added a build step * Added a build step * Changed the lint action to work only on python changes. * Changed the lint action to work only on python changes. * Changed the lint action to work only on python changes. * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Added the ability to compile a html report * Coverage * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Finished test and build workflow * Repaired a bug. * Repaired a bug. * Repaired a bug. * Repaired a bug. * Repaired a bug. * Added a github branch.ref * Removed a poetry install * Docbuild now excludes templates * Added the seminarpräsentation to the documentation build * Added the seminarpräsentation to the documentation build * Added the seminarpräsentation to the documentation build * dded a few images * Changed the pre-commit image * Changed the pre-commit image * Presentation done * Never executing jupyter for sphinx * Never executing jupyter for sphinx * Never executing jupyter for sphinx * Never executing jupyter for sphinx * Never executing jupyter for sphinx
This commit is contained in:
61
.github/workflows/documentation.yaml
vendored
Normal file
61
.github/workflows/documentation.yaml
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
name: Documentation-Action
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
doc-build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: sudo apt install pandoc -y
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.4.2
|
||||
virtualenvs-create: false
|
||||
- run: poetry install --only doc,root,develop
|
||||
- name: Doc-Build
|
||||
run: |
|
||||
cd documentations
|
||||
sphinx-apidoc -o . ../src/aki_prj23_transparenzregister -feP
|
||||
make html
|
||||
- name: Package artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: documentations/_build/html/
|
||||
|
||||
doc-deploy:
|
||||
name: Deployment
|
||||
runs-on: ubuntu-latest
|
||||
needs: doc-build
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
if: github.ref == 'refs/heads/main'
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- run: echo "Deployment URL = ${{ steps.deployment.outputs.page_url }}"
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: github-pages
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
with:
|
||||
artifact_name: github-pages
|
80
.github/workflows/lint-actions.yaml
vendored
Normal file
80
.github/workflows/lint-actions.yaml
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
name: Python-Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '*.py'
|
||||
- poetry.lock
|
||||
- pyproject.toml
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run-linters:
|
||||
name: Black & mypy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up python
|
||||
id: setup-python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.4.2
|
||||
virtualenvs-create: false
|
||||
virtualenvs-path: ~/local/share/virtualenvs
|
||||
- run: poetry install --without develop,doc,test
|
||||
- name: Run linters
|
||||
uses: wearerequired/lint-action@v2
|
||||
with:
|
||||
black: true
|
||||
mypy: true
|
||||
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: chartboost/ruff-action@v1
|
||||
|
||||
python-requirements:
|
||||
name: Check Python Requirements
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up python
|
||||
id: setup-python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.4.2
|
||||
virtualenvs-path: ~/local/share/virtualenvs
|
||||
- name: Cache pipenv
|
||||
id: cache-pipenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
key: venv
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Poetry export
|
||||
run: poetry export -f requirements.txt --output requirements.txt
|
||||
- name: Check license
|
||||
run: |
|
||||
poetry run pip install pip-licenses
|
||||
poetry run pip-licenses --format=markdown --output-file=license-summary.md
|
||||
- name: Archive license summary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: license-summary
|
||||
path: |
|
||||
license-summary.md
|
||||
requirements.txt
|
||||
- name: Check requirements security with pip-audit
|
||||
uses: pypa/gh-action-pip-audit@v1.0.0
|
||||
with:
|
||||
inputs: requirements.txt
|
131
.github/workflows/test-and-build-action.yaml
vendored
Normal file
131
.github/workflows/test-and-build-action.yaml
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
name: Test & Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
push:
|
||||
paths:
|
||||
- '*.py'
|
||||
- poetry.lock
|
||||
- pyproject.toml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.4.2
|
||||
virtualenvs-path: ~/local/share/virtualenvs
|
||||
- id: cache-pipenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
key: venv
|
||||
- run: poetry install --without develop,doc,lint
|
||||
- name: Run test suite
|
||||
run: |
|
||||
poetry run pytest --junit-xml=unit-test-results.xml --cov-report "xml:coverage.xml" --cov=src tests/
|
||||
- name: Archive code coverage results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: code-coverage-report
|
||||
path: |
|
||||
coverage.xml
|
||||
.coverage
|
||||
- name: Archive code coverage results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: test-report
|
||||
path: |
|
||||
unit-test-results.xml
|
||||
if-no-files-found: error
|
||||
|
||||
coverage_pull_request:
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: code-coverage-report
|
||||
- name: Get Cover
|
||||
uses: orgoro/coverage@v3.1
|
||||
with:
|
||||
coverageFile: coverage.xml
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
thresholdAll: 0.8
|
||||
thresholdNew: 0.8
|
||||
thresholdModified: 0.8
|
||||
|
||||
coverage_report:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
- id: cache-pipenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
key: venv
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.4.2
|
||||
virtualenvs-path: ~/local/share/virtualenvs
|
||||
- run: |
|
||||
poetry install --only test
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: code-coverage-report
|
||||
- name: Make Coverage Report
|
||||
run: |
|
||||
poetry run coverage html
|
||||
- name: Archive builds
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Coverage Report HTML
|
||||
path: htmlcov/
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.4.2
|
||||
virtualenvs-path: ~/local/share/virtualenvs
|
||||
- id: cache-pipenv
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/share/virtualenvs
|
||||
key: venv
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: |
|
||||
poetry install --without develop,doc,lint,test
|
||||
poetry build
|
||||
- name: Archive builds
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: builds
|
||||
path: dist/
|
Reference in New Issue
Block a user