Skip to content

Migrate RTD URLs to docs.ansible.com #1314

Migrate RTD URLs to docs.ansible.com

Migrate RTD URLs to docs.ansible.com #1314

Workflow file for this run

name: CI
on:
pull_request:
push:
env:
UPSTREAM_REPOSITORY_ID: >-
245499251
jobs:
pre-setup:
name: βš™οΈ Pre-set global build settings
runs-on: ubuntu-latest
timeout-minutes: 1
defaults:
run:
shell: python
outputs:
# NOTE: These aren't env vars because the `${{ env }}` context is
# NOTE: inaccessible when passing inputs to reusable workflows.
upstream-repository-id: ${{ env.UPSTREAM_REPOSITORY_ID }}
is-debug-mode: ${{ toJSON(runner.debug == '1') }}
steps:
- name: No-op so that the computations can happen in the outputs
if: fromJSON(false)
run: |
print('No-op')
sanity:
name: 🧹 Linters${{ '' }} # nest jobs under the same sidebar category
needs:
- pre-setup
strategy:
fail-fast: false
matrix:
runner-vm-os:
- ubuntu-24.04
python-version:
- 3.12
toxenv:
- linters
- docs
xfail:
- false
uses: tox-dev/workflow/.github/workflows/reusable-tox.yml@89de3c6be3cd179adf71e28aa4ac5bef60804209 # yamllint disable-line rule:line-length
with:
cache-key-for-dependency-files: # FIXME
check-name: >-
${{ matrix.toxenv }}
under 🐍${{ matrix.python-version }}
python-version: >-
${{ matrix.python-version }}
require-successful-codecov-uploads: >-
${{
toJSON(
needs.pre-setup.outputs.upstream-repository-id
== github.repository_id
)
}}
runner-vm-os: >-
${{ matrix.runner-vm-os }}
timeout-minutes: 2
toxenv: >-
${{ matrix.toxenv }}
xfail: >-
${{ fromJSON(matrix.xfail) }}
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
tests:
name: πŸ§ͺ Tests${{ '' }} # nest jobs under the same sidebar category
needs:
- pre-setup # transitive, for accessing settings
strategy:
fail-fast: >- # ${{ runner.debug }} is unavailable in this context
${{
fromJSON(needs.pre-setup.outputs.is-debug-mode)
&& false
|| true
}}
matrix:
python-version:
# NOTE: The latest and the lowest supported Pythons are prioritized
# NOTE: to improve the responsiveness. It's nice to see the most
# NOTE: important results first.
- 3.14
- 3.9
- 3.13
- 3.12
- 3.11
- >-
3.10
runner-vm-os:
- ubuntu-24.04
toxenv:
- integration
- unit
xfail:
- false
uses: tox-dev/workflow/.github/workflows/reusable-tox.yml@89de3c6be3cd179adf71e28aa4ac5bef60804209 # yamllint disable-line rule:line-length
with:
cache-key-for-dependency-files: # FIXME
check-name: >-
${{ matrix.toxenv }}
under 🐍${{ matrix.python-version }}
checkout-src-git-fetch-depth: >-
${{ matrix.toxenv == 'unit' && 1 || 0 }}
job-dependencies-context: >- # context for hooks
${{ toJSON(needs) }}
python-version: >-
${{ matrix.python-version }}
require-successful-codecov-uploads: >-
${{
toJSON(
needs.pre-setup.outputs.upstream-repository-id
== github.repository_id
)
}}
runner-vm-os: >-
${{ matrix.runner-vm-os }}
timeout-minutes: >-
${{ matrix.toxenv == 'unit' && 2 || 9 }}
toxenv: >-
${{ matrix.toxenv }}
tox-run-posargs: >-
--run-destructive
--cov-report=xml:.tox/.tmp/.test-results/pytest-${{
matrix.python-version
}}/cobertura.xml
--junitxml=.tox/.tmp/.test-results/pytest-${{
matrix.python-version
}}/test.xml
tox-rerun-posargs: >-
--run-destructive
--no-cov
-vvvvv
--lf
xfail: >-
${{ fromJSON(matrix.xfail) }}
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
check: # This job does nothing and is only used for the branch protection
name: βœ… All tests passed
if: always()
needs:
- pre-setup # transitive, for accessing settings
- sanity
- tests
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}