Skip to content

Commit

Permalink
chore(ci): Add check that api doc is up to date to concrete-python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgerieQuentin committed Nov 28, 2024
1 parent d866b32 commit 2dbe638
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/concrete_python_release_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
- name: Check documentation
run: |
WHEEL_DIR=$(pwd)/${{ format('wheel-{0}-linux-x86', matrix.python-version) }}
CONCRETE_WHEEL="${WHEEL_DIR}"/*.whl .github/workflows/scripts/make_apidocs.sh
CONCRETE_WHEEL="${WHEEL_DIR}/*.whl" .github/workflows/scripts/make_apidocs.sh
- name: Upload docs.patch if failure
if: ${{ failure() }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/concrete_python_tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,62 @@ jobs:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "build-python-bindings finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})"

test-apidoc-up-to-date:
needs: [ build-python-bindings ]
runs-on: ubuntu-latest
env:
python-version: 3.8
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ env.python-version }}
- name: Download concrete-compiler python-bindings
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: concrete-compiler-python-bindings
path: compiler-artifacts
- name: Extract artifacts archive
run: |
cd compiler-artifacts
echo "$PWD"
tar xzvf artifacts.tgz
- name: Build wheel
run: |
set -e
echo "$PWD"
export COMPILER_BUILD_DIRECTORY=${{ github.workspace }}/compiler-artifacts
echo "$COMPILER_BUILD_DIRECTORY"
cd ${{ github.workspace }}/frontends/concrete-python
make PYTHON=${{ format('python{0}', env.python-version) }} venv
source .venv/bin/activate
make whl
- name: Check documentation
run: |

Check failure on line 149 in .github/workflows/concrete_python_tests_linux.yml

View workflow job for this annotation

GitHub Actions / action-lint

shellcheck reported issue in this script: SC2125:warning:2:16: Brace expansions and globs are literal in assignments. Quote it or use an array
WHEEL_DIR=${{ github.workspace }}/frontends/concrete-python/dist/
CONCRETE_WHEEL="${WHEEL_DIR}"/*.whl .github/workflows/scripts/make_apidocs.sh
- name: Upload docs.patch if failure
if: ${{ failure() }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: docs-artifacts
path: |
docs.patch
docs/dev/api
retention-days: 3
- name: Slack Notification
if: ${{ failure() && github.ref == 'refs/heads/main' }}
continue-on-error: true
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "test-apidoc-up-to-date finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})"

test-pytest:
needs: [setup-instance, build-python-bindings]
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
Expand Down

0 comments on commit 2dbe638

Please sign in to comment.