Skip to content

antsibull-build tests #4

antsibull-build tests

antsibull-build tests #4

---
# Copyright (c) Ansible Project
# 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
name: antsibull-build tests
on:
push:
branches: [main]
pull_request:
branches: [main]
# Run once per week (Monday at 04:00 UTC)
schedule:
- cron: '0 4 * * 1'
env:
FORCE_COLOR: "1"
jobs:
build:
name: 'Build Ansible community distribution (${{ matrix.name }})'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Ansible 8
options: '-e antsibull_ansible_version=8.99.0'
python: '3.9'
antsibull_changelog_ref: 0.24.0
antsibull_core_ref: stable-2
- name: Ansible 9
options: '-e antsibull_ansible_version=9.99.0'
python: '3.11'
antsibull_changelog_ref: main
antsibull_core_ref: stable-2
- name: Ansible 10
options: '-e antsibull_ansible_version=10.99.0'
python: '3.12'
antsibull_changelog_ref: main
antsibull_core_ref: main
- name: Ansible 11
options: '-e antsibull_ansible_version=11.99.0'
python: '3.12'
antsibull_changelog_ref: main
antsibull_core_ref: main
steps:
- name: Check out antsibull
uses: actions/checkout@v4
with:
path: antsibull
- name: Check out dependent project antsibull-changelog
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-changelog
path: antsibull-changelog
ref: ${{ matrix.antsibull_changelog_ref }}
- name: Check out dependent project antsibull-core
uses: actions/checkout@v4
with:
repository: ansible-community/antsibull-core
path: antsibull-core
ref: ${{ matrix.antsibull_core_ref }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Use pip manually to ensure the correct Python is used
- name: Install nox
run: pip install --user -U nox
- name: "Test building a release: ${{ matrix.name }}"
run: |
OTHER_ANTSIBULL_MODE=local nox -e coverage_release -- ${{ matrix.options }}
working-directory: antsibull
- name: Report coverage
run: |
nox -v -e coverage
working-directory: antsibull
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
working-directory: antsibull
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}