nox #229
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 <[email protected] | |
name: nox | |
'on': | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# 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 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- session: test | |
python-versions: "3.9, 3.10, 3.11" | |
codecov: true | |
packages: "" | |
- session: "check_package_files(8.1.0)" | |
python-versions: "3.11" | |
codecov: true | |
packages: "" | |
- session: "check_package_files(7.5.0)" | |
python-versions: "3.11" | |
codecov: true | |
packages: "" | |
- session: "check_package_files(8.1.0_setup_cfg)" | |
python-versions: "3.11" | |
codecov: true | |
packages: "" | |
- session: lint | |
python-versions: "3.11" | |
codecov: false | |
packages: "" | |
name: "Run nox ${{ matrix.session }} session" | |
steps: | |
- name: Check out antsibull | |
uses: actions/checkout@v3 | |
with: | |
path: antsibull | |
- name: Install extra packages | |
if: "matrix.packages != ''" | |
run: | | |
sudo apt-get install -y ${{ matrix.packages }} | |
- name: Setup nox | |
uses: wntrblm/[email protected] | |
with: | |
python-versions: "${{ matrix.python-versions }}" | |
- name: "Run nox -e ${{ matrix.session }}" | |
run: | | |
OTHER_ANTSIBULL_MODE=git nox -v -e "${{ matrix.session }}" | |
- name: Report coverage | |
if: ${{ matrix.codecov }} | |
run: | | |
nox -v -e coverage | |
- name: Upload coverage | |
if: ${{ matrix.codecov }} | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: antsibull | |
name: "${{ matrix.session }}" |