mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-20 22:12:53 +02:00
NER und Sentiment-Pipeline mit Services zur Datenextraktion. --------- Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de> Co-authored-by: TrisNol <tristan.nolde@yahoo.de>
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
name: Python-Lint
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
Black:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v3
|
|
- name: Run black
|
|
uses: psf/black@stable
|
|
with:
|
|
options: --check --diff --color --fast
|
|
src: ./src ./tests
|
|
|
|
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.6.1
|
|
virtualenvs-create: false
|
|
virtualenvs-path: ~/local/share/virtualenvs
|
|
- run: poetry install --without develop,doc --all-extras
|
|
- name: Run mypy
|
|
run: |
|
|
mypy src tests
|
|
|
|
ruff:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: chartboost/ruff-action@v1
|
|
with:
|
|
version: 0.0.292
|
|
|
|
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.6.1
|
|
virtualenvs-create: true
|
|
virtualenvs-path: ~/local/share/virtualenvs
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v3
|
|
- name: Install root, pip-licenses & pip-audit
|
|
run: |
|
|
poetry run pip install pip-licenses pip-audit
|
|
- name: Poetry export
|
|
run: poetry export -f requirements.txt --output requirements.txt
|
|
- name: Check license
|
|
run: |
|
|
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
|
|
run: |
|
|
poetry run pip-audit --format markdown -o lbr-audit.md
|