Skip to content

Commit b2da8bc

Browse files
committed
Move file-test to check_docs.yml
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
1 parent 922ca5e commit b2da8bc

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/check_docs.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ on:
88
default: ''
99
required: true
1010
type: string
11+
package-basepath:
12+
description: 'The parent directory of the package.'
13+
default: ''
14+
required: true
15+
type: string
1116

1217
jobs:
1318
check_docs:
19+
if: ${{ always() && hashFiles(format('{0}/{1}/docs/conf.py', inputs.package-basepath, inputs.package-name)) != '' }}
1420
name: Check docs for ${{ inputs.package-name }}
1521
runs-on: ubuntu-latest
1622
defaults:
1723
run:
1824
# Set the working-directory for all steps in this job.
19-
working-directory: ./packages/${{ inputs.package-name }}
25+
working-directory: ./${{ inputs.package-basepath }}/${{ inputs.package-name }}
2026
steps:
2127
- name: Check out repo
2228
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -31,7 +37,7 @@ jobs:
3137
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
3238
with:
3339
path: .venv
34-
key: ${{ inputs.package-name }}-with-docs-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles(format('packages/{0}/poetry.lock', inputs.package-name)) }}
40+
key: ${{ inputs.package-name }}-with-docs-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles(format('{0}/{1}/poetry.lock', inputs.package-basepath, inputs.package-name)) }}
3541
- name: Install nitypes (with docs)
3642
run: poetry install -v --only main,docs
3743
- name: Generate docs
@@ -40,4 +46,4 @@ jobs:
4046
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4147
with:
4248
name: ${{ inputs.package-name }}-docs
43-
path: packages/${{ inputs.package-name }}/docs/_build/
49+
path: ${{ inputs.package-basepath }}/${{ inputs.package-name }}/docs/_build/

.github/workflows/check_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
package-base-path: ${{ needs.get_package_info.outputs.package-basepath }}
3737
install-drivers: ${{ needs.get_package_info.outputs.install-drivers == 'true' }}
3838
check_docs:
39-
if: ${{ always() && hashFiles(format('{0}/{1}/docs/conf.py', needs.get_package_info.outputs.package-basepath, inputs.package-name)) != '' }}
4039
name: Check docs for ${{ inputs.package-name }}
4140
uses: ./.github/workflows/check_docs.yml
4241
with:
4342
package-name: ${{ inputs.package-name }}
43+
package-basepath: ${{ needs.get_package_info.outputs.package-basepath }}

0 commit comments

Comments
 (0)