Skip to content

Commit

Permalink
added ruff mypy and tests to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioteula committed Oct 6, 2024
1 parent 19c9122 commit cb65227
Showing 1 changed file with 81 additions and 21 deletions.
102 changes: 81 additions & 21 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,116 @@ permissions:
pull-requests: read

jobs:

isort:
ruff:
runs-on: ubuntu-latest
container:
image: python:3.12
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install isort
- name: Check imports order
run: isort -c .
run: pip install ruff
- name: Check code errors
run: ruff check --output-format=github .

black:
mypy:
runs-on: ubuntu-latest
container:
image: python:3.12
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install black
- name: Check code format
run: black --check --diff --color .
run: pip install mypy
- name: Check code errors
run: mypy amazon_paapi

flake8:
test-py35:
runs-on: ubuntu-latest
container:
image: python:3.12
image: python:3.5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install flake8
- name: Check code errors
run: flake8 .
run: pip install -e .
- name: Run tests
run: unittest

pylint:
test-py36:
runs-on: ubuntu-latest
container:
image: python:3.12
image: python:3.6
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install pylint
- name: Check code errors
run: find . -type f -name '*.py' | xargs pylint --disable=missing-docstring --disable=too-few-public-methods
run: pip install -e .
- name: Run tests
run: unittest

test-py37:
runs-on: ubuntu-latest
container:
image: python:3.7
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install -e .
- name: Run tests
run: unittest

test-py38:
runs-on: ubuntu-latest
container:
image: python:3.8
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install -e .
- name: Run tests
run: unittest

test-py39:
runs-on: ubuntu-latest
container:
image: python:3.9
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install -e .
- name: Run tests
run: unittest

test-py310:
runs-on: ubuntu-latest
container:
image: python:3.10
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install -e .
- name: Run tests
run: unittest

test-py311:
runs-on: ubuntu-latest
container:
image: python:3.11
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install -e .
- name: Run tests
run: unittest


test:
test-py312:
runs-on: ubuntu-latest
container:
image: python:3.12
Expand All @@ -77,7 +137,7 @@ jobs:

sonar:
runs-on: ubuntu-latest
needs: [test]
needs: [test-py312]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down

0 comments on commit cb65227

Please sign in to comment.