Skip to content

feature(packge): Additional mypy and ruff configuration #3

feature(packge): Additional mypy and ruff configuration

feature(packge): Additional mypy and ruff configuration #3

# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2024 Helio Chissini de Castro
name: Commit Validation
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**.rst'
push:
jobs:
build:
name: Commit Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: webiny/[email protected]
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'poetry'
- run:
poetry install -q
- name: MyPy static check source
id: mypy
run: |
poetry run mypy --config-file pyproject.toml --pretty ./src >> $GITHUB_STEP_SUMMARY
continue-on-error: true
- name: MyPy static check tests
id: mypy

Check failure on line 39 in .github/workflows/commit_checks.yaml

View workflow run for this annotation

GitHub Actions / Commit Validation

Invalid workflow file

The workflow is not valid. .github/workflows/commit_checks.yaml (Line: 39, Col: 13): The identifier 'mypy' may not be used more than once within the same scope.
run: |
poetry run mypy --config-file pyproject.toml --pretty ./tests >> $GITHUB_STEP_SUMMARY
continue-on-error: true
- name: Ruff Linting
id: ruff
run: |
poetry install
poetry run ruff check --config pyproject.toml --output-format github .
continue-on-error: true
- run: |
if [ ${{ steps.mypy.outcome }} != 'success' ] || [ ${{ steps.ruff.outcome }} != 'success' ]; then
echo "One or more checks failed"
exit 1
fi