Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Black

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
blackCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
BLACK_VERSION=$(sed -nE 's/black = "==(.*)"/\1/p' Pipfile)
pip install black==$BLACK_VERSION
- name: Analysing the code with black
run: |
black $(git rev-parse --show-toplevel) --check
25 changes: 25 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: flake8

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
Flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
pip install pipenv==$(sed -nE 's/pipenv = "==(.*)"/\1/p' Pipfile)
pipenv install --system
- name: Analysing the code with flake8
run: |
flake8 $(git rev-parse --show-toplevel)
25 changes: 25 additions & 0 deletions .github/workflows/isort.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: isort

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
isortCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
ISORT_VERSION=$(sed -nE 's/isort = "==(.*)"/\1/p' Pipfile)
pip install isort==$ISORT_VERSION
- name: Analysing the code with isort
run: |
isort --check-only $(git rev-parse --show-toplevel)/ --profile black
24 changes: 24 additions & 0 deletions .github/workflows/lfendings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check Line Endings

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
check-line-endings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for CRLF line endings
run: |
for file in $(git ls-files); do
if grep -q $'\r$' "$file"; then
echo "$file has faulty file endings"
fi
done
if git grep -I --name-only $'\r'; then
echo "CRLF line endings detected"
exit 1
fi
45 changes: 0 additions & 45 deletions .github/workflows/lint.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pylint

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
pylintTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
PYLINT_VERSION=$(sed -nE 's/pylint = "==(.*)"/\1/p' Pipfile)
pip install pylint==$PYLINT_VERSION
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')