Skip to content

Merge pull request #163 from powerapi-ng/dependabot/github_actions/co… #58

Merge pull request #163 from powerapi-ng/dependabot/github_actions/co…

Merge pull request #163 from powerapi-ng/dependabot/github_actions/co… #58

Workflow file for this run

name: Build
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
permissions:
contents: read
jobs:
build-and-test:
name: Build project and run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.x"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[devel]"
- name: Lint with flake8
run: |
flake8 --count --show-source --statistics powerapi/ tests/
- name: Static code analysis with pylint
run: |
pylint powerapi/ tests/
- name: Test with pytest
run: |
pytest --cov=powerapi --cov-report=term --cov-report=xml tests/unit
- name: Upload coverage reports to Codecov
if: ${{ matrix.python-version }} == "3.8"
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml