Bump codecov/codecov-action from 4 to 5 (#179) #495
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
--- | |
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or | |
# https://www.gnu.org/licenses/gpl-3.0.txt) | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
# SPDX-FileCopyrightText: 2023 Maxwell G <maxwell@gtmx.me | |
name: nox | |
'on': | |
push: | |
branches: | |
- main | |
- stable-* | |
pull_request: | |
branches: | |
- main | |
- stable-* | |
# Run once per week (Monday at 04:00 UTC) | |
schedule: | |
- cron: '0 4 * * 1' | |
workflow_dispatch: | |
env: | |
FORCE_COLOR: "1" | |
jobs: | |
nox: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: antsibull-core | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- session: test | |
python-versions: "3.9, 3.10, 3.11, 3.12, 3.13" | |
codecov: true | |
packages: "" | |
- session: lint | |
python-versions: "3.13" | |
codecov: false | |
packages: "" | |
name: "Run nox ${{ matrix.session }} session" | |
steps: | |
- name: Check out antsibull-core | |
uses: actions/checkout@v4 | |
with: | |
path: antsibull-core | |
- name: Check out dependent project antsibull-fileutils | |
uses: actions/checkout@v4 | |
with: | |
repository: ansible-community/antsibull-fileutils | |
path: antsibull-fileutils | |
- name: Install extra packages | |
if: "matrix.packages != ''" | |
run: | | |
sudo apt-get install -y ${{ matrix.packages }} | |
- name: Setup nox | |
uses: wntrblm/nox@2024.10.09 | |
with: | |
python-versions: "${{ matrix.python-versions }}" | |
- name: Set up nox environments | |
run: | | |
nox -v -e "${{ matrix.session }}" ${{ matrix.codecov && 'coverage' || '' }} --install-only | |
- name: "Run nox -e ${{ matrix.session }}" | |
run: | | |
nox -v -e "${{ matrix.session }}" --reuse-existing-virtualenvs --no-install | |
- name: Report coverage | |
if: ${{ matrix.codecov }} | |
run: | | |
nox -v -e coverage --reuse-existing-virtualenvs --no-install | |
- name: Upload coverage | |
if: ${{ matrix.codecov }} | |
uses: codecov/codecov-action@v5 | |
with: | |
name: "${{ matrix.session }}" | |
working-directory: antsibull-core | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |