build(deps): bump python from 835b976
to 59c7332
#590
Workflow file for this run
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: 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.10", "3.x"] | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 | |
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 src/ tests/ | |
- name: Static code analysis with pylint | |
run: | | |
pylint src/ 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.10" | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
build-container-image: | |
name: Build container image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | |
- name: Build image | |
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1 | |
with: | |
push: false | |
provenance: false | |
load: true | |
tags: localbuild/powerapi:sha-${{ github.sha }} |