mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Add noxfile and workflow to test docsite PRs (#1794)
* add noxfile with mkdocs build session * add nox build check * include reusable nox in ci workflow
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -99,3 +99,5 @@ jobs:
|
||||
echo "${no_log}"
|
||||
exit 1
|
||||
fi
|
||||
nox-sessions:
|
||||
uses: ./.github/workflows/reusable-nox.yml
|
||||
|
||||
26
.github/workflows/reusable-nox.yml
vendored
Normal file
26
.github/workflows/reusable-nox.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: nox
|
||||
|
||||
"on":
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
nox:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- session: build
|
||||
python-versions: "3.11"
|
||||
name: "Run nox ${{ matrix.session }} session"
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup nox
|
||||
uses: wntrblm/nox@2024.03.02
|
||||
with:
|
||||
python-versions: "${{ matrix.python-versions }}"
|
||||
- name: "Run nox -s ${{ matrix.session }}"
|
||||
run: |
|
||||
nox -s "${{ matrix.session }}"
|
||||
20
noxfile.py
Normal file
20
noxfile.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import nox
|
||||
|
||||
|
||||
@nox.session
|
||||
def build(session: nox.Session):
|
||||
"""
|
||||
Build the AWX Operator docsite.
|
||||
"""
|
||||
session.install(
|
||||
"-r",
|
||||
"docs/requirements.in",
|
||||
"-c",
|
||||
"docs/requirements.txt",
|
||||
)
|
||||
session.run(
|
||||
"mkdocs",
|
||||
"build",
|
||||
"--strict",
|
||||
*session.posargs,
|
||||
)
|
||||
Reference in New Issue
Block a user