Bump codecov/codecov-action from 5.0.7 to 5.1.1 #1367
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
# Copyright (C) 2020-2024 Serghei Iakovlev <gnu@serghei.pl> | |
# | |
# This file is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 3 | |
# of the License, or (at your option) any later version. | |
# | |
# This file is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this file. If not, see <https://www.gnu.org/licenses/>. | |
name: CI | |
on: | |
push: | |
branches-ignore: | |
# These should always correspond to pull requests, so ignore them for | |
# the push trigger and let them be triggered by the pull_request | |
# trigger, avoiding running the workflow twice. This is a minor | |
# optimization so there's no need to ensure this is comprehensive. | |
- 'dependabot/**' | |
pull_request: | |
branches: | |
- main | |
env: | |
PYTHONUNBUFFERED: '1' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
name: Python ${{ matrix.python }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
# The maximum number of minutes to let a workflow run | |
# before GitHub automatically cancels it. Default: 360 | |
timeout-minutes: 30 | |
strategy: | |
# When set to true, GitHub cancels | |
# all in-progress jobs if any matrix job fails. | |
fail-fast: false | |
matrix: | |
python: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 5 | |
- name: Set up Python ${{ matrix.python }} | |
id: setup-python | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.4 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: testing-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
testing-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}- | |
- name: Validates the content of the pyproject.toml | |
run: poetry check | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --with=testing --without=docs --without=build --no-root | |
- name: Install project | |
run: poetry install --no-interaction | |
- name: Run unit tests with coverage | |
run: | | |
source $VENV | |
coverage run -m pytest ./gstore ./tests | |
coverage combine | |
coverage xml | |
- uses: codecov/codecov-action@v5.1.1 | |
if: success() | |
with: | |
fail_ci_if_error: false | |
name: codecov-umbrella | |
flags: unittests | |
env_vars: OS,PYTHON | |
file: ./coverage.xml | |
- name: Success Reporting | |
if: success() | |
run: git log --format=fuller -5 |