Debian Codegraph @

.github/workflows/code_check.yaml

raw
1 name: Code Check
2
3 on:
4 workflow_call:
5 inputs:
6 publish_performance:
7 required: true
8 type: boolean
9 store_benchmark:
10 required: true
11 type: boolean
12
13 jobs:
14 check:
15 runs-on: ubuntu-22.04
16 strategy:
17 matrix:
18 python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
19
20 name: Python ${{ matrix.python-version }}
21 steps:
22 - uses: actions/checkout@v4
23 - name: Set up Python ${{ matrix.python-version }}
24 uses: actions/setup-python@v5
25 with:
26 python-version: ${{ matrix.python-version }}
27 architecture: x64
28 - name: Install dependencies
29 run: pip install -e ".[dev]"
30 - name: Testing Check
31 run: pytest --cov=dacite
32 - name: Formatting Check
33 run: black --check .
34 - name: Typing Check
35 run: mypy dacite
36 - name: Linting Check
37 run: pylint dacite
38 - name: Performance Check
39 uses: benchmark-action/github-action-benchmark@v1
40 with:
41 tool: 'pytest'
42 output-file-path: benchmark.json
43 save-data-file: ${{ inputs.store_benchmark }}
44 github-token: ${{ secrets.GITHUB_TOKEN }}
45 auto-push: ${{ inputs.publish_performance }}
46 benchmark-data-dir-path: performance/${{ matrix.python-version }}
47 comment-always: false
48 alert-threshold: '130%'
49 comment-on-alert: true
50 fail-on-alert: false