fix: get all available rules from the helpers.rules object #7
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
--- | |
name: Code linting and checking | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
paths: | |
- "**.py" | |
- ".github/workflows/lint-and-check.yaml" | |
- "image-version-checker" | |
pull_request: | |
workflow_dispatch: | |
env: | |
MODULES: docker_tag_updater | |
jobs: | |
lint-and-check: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.11" | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup Python, Poetry and Dependencies | |
uses: packetcoders/action-setup-cache-python-poetry@main | |
with: | |
python-version: ${{ matrix.python-version }} | |
poetry-version: 1.3.2 | |
- name: Lint code | |
run: poetry run pylint "$MODULES" | |
- name: Check static typing | |
if: always() | |
run: poetry run mypy "$MODULES" | |
- name: Test code | |
if: always() | |
run: poetry run pytest --cov --cov-report=xml | |
- name: Upload to Codecov | |
if: ${{ env.CODECOV_TOKEN }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ env.CODECOV_TOKEN }} | |
slug: ${{ github.repository }} |