Skip to content

Merge pull request #176 from stfc/move_chatops #51

Merge pull request #176 from stfc/move_chatops

Merge pull request #176 from stfc/move_chatops #51

name: Pylint-Tests-Codecov
on:
push:
branches:
- master
pull_request:
paths:
- "MonitoringTools/**"
- ".github/workflows/MonitoringTools.yaml"
jobs:
Pylint-Tests-Codecov:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd MonitoringTools
pip install -r requirements.txt
- name: Analyse with pylint
run: cd MonitoringTools && pylint $(git ls-files '*.py')
- name: Run tests and collect coverage
run: cd MonitoringTools && python3 -m pytest
- name: Run tests and collect coverage
run: cd MonitoringTools && python3 -m pytest . --cov-report xml:coverage.xml --cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./MonitoringTools/coverage.xml