-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.35 KB
/
commit_checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# 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
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