fix action regestry #16
This file contains 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: Python Lintingon and tests | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python 3.10 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
flake8 core --count --select=E9,F63,F7,F82 --show-source --statistics --exit-zero | |
flake8 core --count --max-complexity=10 --max-line-length=79 --statistics --exit-zero | |
- name: Lint with Pylint | |
run: | | |
pylint core --exit-zero | |
- name: Run tests | |
run: | | |
coverage run -m unittest | |
- name: Generate coverage report | |
run: | | |
coverage xml | |
- name: Upload coverage report to Codacy | |
uses: codacy/[email protected] | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
# or | |
# api-token: ${{ secrets.CODACY_API_TOKEN }} | |
coverage-reports: coverage.xml | |
# or a comma-separated list for multiple reports | |
# coverage-reports: coverage.xml, coverage2.xml |