Update stress_test.yml #69
This file contains hidden or 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: Pylint | |
| on: [push, pull_request] | |
| jobs: | |
| pylint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install your project dependencies if you have a requirements.txt | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| # Install pylint | |
| pip install pylint | |
| - name: Analysing the code with pylint | |
| run: | | |
| # Find all Python files and run pylint on them | |
| find . -type f -name "*.py" | xargs pylint --exit-zero | |
| # Alternative: Use git to find Python files (your original approach) | |
| # pylint $(git ls-files '*.py') --exit-zero | |
| - name: Generate pylint report | |
| run: | | |
| # Generate a detailed report and save to file | |
| find . -type f -name "*.py" | xargs pylint --output-format=text --reports=yes > pylint-report.txt || true | |
| - name: Upload pylint report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pylint-report-${{ matrix.python-version }} | |
| path: pylint-report.txt |