mirror of
				https://github.com/Eledio/superfaktura-client.git
				synced 2025-10-31 16:11:20 +01:00 
			
		
		
		
	GA pylint: modify
This commit is contained in:
		
							
								
								
									
										31
									
								
								.github/workflows/pylint.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/pylint.yml
									
									
									
									
										vendored
									
									
								
							| @@ -7,7 +7,7 @@ jobs: | |||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     strategy: |     strategy: | ||||||
|       matrix: |       matrix: | ||||||
|         python-version: ["3.8", "3.9", "3.10"] |         python-version: ["3.10"] | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v4 |     - uses: actions/checkout@v4 | ||||||
|     - name: Set up Python ${{ matrix.python-version }} |     - name: Set up Python ${{ matrix.python-version }} | ||||||
| @@ -18,6 +18,31 @@ jobs: | |||||||
|       run: | |       run: | | ||||||
|         python -m pip install --upgrade pip |         python -m pip install --upgrade pip | ||||||
|         pip install pylint |         pip install pylint | ||||||
|     - name: Analysing the code with pylint |     - name: pylint | ||||||
|       run: | |       run: | | ||||||
|         pylint $(git ls-files '*.py') |         pylint $(git ls-files '*.py') --fail-under=9.0 --output-format=json > pylint-report.json | ||||||
|  |  | ||||||
|  |     - name: Generate Pylint Score | ||||||
|  |       id: pylint_score | ||||||
|  |       run: | | ||||||
|  |         SCORE=$(cat pylint-report.json | jq '[.[].score] | add / length' || echo 0) | ||||||
|  |         echo "score=${SCORE:-0}" >> $GITHUB_ENV | ||||||
|  |  | ||||||
|  |     - name: Upload Pylint Report | ||||||
|  |       uses: actions/upload-artifact@v4 | ||||||
|  |       with: | ||||||
|  |         name: pylint-report | ||||||
|  |         path: pylint-report.json | ||||||
|  |  | ||||||
|  |     - name: Create Pylint Badge | ||||||
|  |       run: | | ||||||
|  |         SCORE=$(echo "${{ env.score }}" | awk '{print int($1)}') | ||||||
|  |         COLOR="red" | ||||||
|  |         if [ "$SCORE" -ge 8 ]; then COLOR="green"; elif [ "$SCORE" -ge 5 ]; then COLOR="yellow"; fi | ||||||
|  |         curl -o pylint-badge.svg "https://img.shields.io/badge/Pylint-$SCORE%2F10-$COLOR" | ||||||
|  |  | ||||||
|  |     - name: Upload Pylint Badge | ||||||
|  |       uses: actions/upload-artifact@v4 | ||||||
|  |       with: | ||||||
|  |         name: pylint-badge | ||||||
|  |         path: pylint-badge.svg | ||||||
|   | |||||||
| @@ -1,5 +1,8 @@ | |||||||
| # SuperFaktura API client | # SuperFaktura API client | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Library for handling of SuperFaktura API. | Library for handling of SuperFaktura API. | ||||||
|  |  | ||||||
| Environment variables: | Environment variables: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user