Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/pylint.yml → .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
name: Pylint
name: Linting and testing

on:
push:
branches:
- main
paths:
- 'taky/**'
- 'taky/**'
pull_request:
workflow_dispatch:

jobs:
build:
lint-and-test:
runs-on: ubuntu-latest

outputs:
pylint-score: ${{ steps.pylint.outputs.score }}
cov-pct: ${{ steps.tests.outputs.cov-pct }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: setup-python
name: Set up Python 3.8
name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- id: pip-cache
name: Cache pip
uses: actions/cache@v2
Expand All @@ -41,7 +44,7 @@ jobs:
- id: pylint
name: Analyzing the code with pylint
run: |
python3 -c "from pylint.lint import Run; ret = Run(['taky'], do_exit=False); print('::set-output name=score::%.2f' % ret.linter.stats.global_note)"
python3 -c "from pylint.lint import Run; ret = Run(['taky']); print('::set-output name=score::%.2f' % ret.linter.stats.global_note)"
- id: tests
name: Running unit tests, generating coverage
run: |
Expand All @@ -50,7 +53,7 @@ jobs:
echo "::set-output name=cov-pct::${COV_PCT}"
badges:
runs-on: ubuntu-latest
needs: build
needs: lint-and-test
steps:
- id: shieldsio-pylint
name: Create the Pylint Badge
Expand Down