Skip to content

Commit

Permalink
Use nox checkers session in CI
Browse files Browse the repository at this point in the history
Now that the docs checkers are integrated into the noxfile, we can use
the nox session in CI instead of having to maintain separate CI
configurations for these jobs.
  • Loading branch information
gotmax23 committed Oct 25, 2023
1 parent 2ca7a63 commit b7f44fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 48 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,5 @@ on:
workflow_dispatch:

jobs:
docs_sanity_docs_build:
name: docs-build
runs-on: ubuntu-22.04
steps:
- name: Checkout Docsite
uses: actions/checkout@v4

- name: Install Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Test Requirements
run: |
python -m pip install -r tests/requirements.in -c tests/requirements.txt
- name: Graft ansible-core
run: |
python docs/bin/clone-core.py
- name: Run docs-build Checkers
run: |
python tests/checkers.py docs-build
docs_sanity_rstcheck:
name: rstcheck
runs-on: ubuntu-22.04
steps:
- name: Checkout Docsite
uses: actions/checkout@v4

- name: Install Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Test Requirements
run: |
python -m pip install -r tests/requirements.in -c tests/requirements.txt
- name: Graft ansible-core
run: |
python docs/bin/clone-core.py
- name: Run rstcheck Checkers
run: |
python tests/checkers.py rstcheck
nox:
uses: ./.github/workflows/reusable-nox.yml
7 changes: 7 additions & 0 deletions .github/workflows/reusable-nox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
python-versions: "3.11"
- session: spelling
python-versions: "3.11"
- session: "checkers(rstcheck)"
python-versions: "3.11"
- session: "checkers(docs-build)"
python-versions: "3.11"
name: "Run nox ${{ matrix.session }} session"
steps:
- name: Check out repo
Expand All @@ -27,6 +31,9 @@ jobs:
uses: wntrblm/nox@2023.04.22
with:
python-versions: "${{ matrix.python-versions }}"
- name: Graft ansible-core
run: |
nox -e clone-core
- name: "Run nox -e ${{ matrix.session }}"
run: |
nox -e "${{ matrix.session }}"

0 comments on commit b7f44fc

Please sign in to comment.