Docstrings added and linked to readthedocs #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Common Library CI | |
# push und pull paths and/or files set here are only the ones triggering this workflow. The actual code to be checked is | |
# set via sparsecheckout in the step "Checkout Repository". | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- 'lib/**' | |
- '.github/workflows/common-library-ci.yml' | |
- '.github/actions/fetch_and_run/action.yml' | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- 'lib/**' | |
- '.github/workflows/common-library-ci.yml' | |
- '.github/actions/fetch_and_run/action.yml' | |
permissions: | |
contents: read | |
jobs: | |
black-Formatting: | |
runs-on: ubuntu-latest | |
steps: | |
# fetches local composite action file from .github directory | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github | |
# fetches data based on composite action file "fetch_and_run" and runs all processes | |
- name: Checkout Repository and Setup Python | |
uses: ./.github/actions/fetch_and_run | |
with: | |
repository: ${{ github.repository }} | |
dependency: black | |
cmd_run: 'cd lib/ && black --check --diff --color .' # change dir to toml loc, only needed if toml not in root | |
opt_in: "pyproject.toml" | |
flake8-Linting: | |
runs-on: ubuntu-latest | |
steps: | |
# fetches local composite action file from .github directory | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github | |
# fetches data based on composite action file "fetch_and_run" and runs all processes | |
- name: Checkout Repository and Setup Python | |
uses: ./.github/actions/fetch_and_run | |
with: | |
repository: ${{ github.repository }} | |
dependency: flake8 | |
cmd_run: 'flake8 --max-line-length 120 --count --statistics .' | |
pytest-Testing: | |
runs-on: ubuntu-latest | |
steps: | |
# fetches local composite action file from .github directory | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github | |
# fetches data based on composite action file "fetch_and_run" and runs all processes | |
- name: Checkout Repository and Setup Python | |
uses: ./.github/actions/fetch_and_run | |
with: | |
repository: ${{ github.repository }} | |
dependency: pytest | |
cmd_run: 'pytest' | |