Update codecov/codecov-action digest to b9fd7d1 #987
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 package | |
on: | |
push: | |
branches-ignore: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: ubuntu-latest | |
container: ubuntu:latest@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install OS dependencies | |
run: | | |
DEBIAN_FRONTEND=noninteractive apt update | |
DEBIAN_FRONTEND=noninteractive apt install curl sqlite3 -y | |
- uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1 | |
with: | |
version: 1.6.1 # pin the version as they keep changing their APIs | |
virtualenvs-create: false | |
virtualenvs-in-project: false | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
. venv/bin/activate | |
poetry install --with test --without dev --no-interaction --no-root --sync | |
python -c "import os; print(os.environ['VIRTUAL_ENV'])" | |
- name: Lint with flake8 | |
run: | | |
. venv/bin/activate | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
env: | |
DOTENV_KEY: ${{ secrets.DOTENV_KEY }} | |
run: | | |
. venv/bin/activate | |
pytest --cov mqtt_to_eventhub_module --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |