Skip to content

Enhancements in docstrings #136

Enhancements in docstrings

Enhancements in docstrings #136

Workflow file for this run

name: Pylint
on:
push:
branches:
- development
jobs:
changes:
name: Verify files
runs-on: ubuntu-latest
outputs:
api: ${{ steps.filter.outputs.api }}
steps:
- uses: actions/checkout@v3
name: Accessing to files
with:
fetch-depth: 2 # last 2 commits
- name: Extracting branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" #output: dmtzs-test-pylint1 or other branch name
id: extract_branch
- uses: dorny/paths-filter@v2
name: Verifying changes in files
id: filter
with:
base: ${{ steps.extract_branch.outputs.branch }} #Uses the branch that trigger the workflow
filters: |
api:
- 'src/**.py'
# run only if 'api' files were changed
- name: workflow tests
if: steps.filter.outputs.api == 'true'
run: echo "Files changed, running deployment job"
# run only if not 'api' files were changed
- name: not workflow tests
if: steps.filter.outputs.api != 'true'
run: echo "Files not changed, passing the deployment job"
build:
needs: changes
name: Executing pylint
runs-on: ubuntu-latest
if: needs.changes.outputs.api == 'true'
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files './src*.py') --rcfile=.github/config/.pylintrc ./