Skip to content

change ci/cd

change ci/cd #1

Workflow file for this run

name: Python Lintingon and tests
on:
push:
branches: [master, develop]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Set up Python 3.10
uses: actions/setup-python@v5.3.0
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install pylint
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
flake8 core --count --max-complexity=10 --max-line-length=79 --statistics
- name: Lint with Pylint
run: |
pylint core
- name: Run tests
run: |
coverage run -m unittest
- name: Generate coverage report
run: |
coverage xml
- name: Upload coverage report to Codacy
uses: codacy/codacy-coverage-reporter-action@v1.3.0
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