Spannerflow- Updated CR #647
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [workflow_dispatch, pull_request, push] | |
env: | |
PYTHON_VERSION: 3.12 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Use nbdev CI Workflow | |
uses: fastai/workflows/nbdev-ci@master | |
with: | |
# The python version that nbdev ci must run on must match the python version used | |
version: ${{ env.PYTHON_VERSION }} | |
skip_test: true | |
- name: Run Tests | |
run: | | |
# Capture both stdout and stderr to a temporary file | |
SPANNERFLOW_LIBRARY_PATH=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/spannerflow | |
patchelf --set-rpath "$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib:$SPANNERFLOW_LIBRARY_PATH/target/release" $SPANNERFLOW_LIBRARY_PATH/rust_grpc_server | |
python nbdev_test.py | tee /tmp/test_output.txt | |
if grep -q "nbdev Tests Failed On The Following Notebooks:" /tmp/test_output.txt; then | |
echo "nbdev Tests Failed" | |
exit 1 | |
fi | |
shell: bash |