From 00e8656ed915a37584d7f7317f217b4b4073e47d Mon Sep 17 00:00:00 2001 From: yanghaoqi Date: Thu, 24 Aug 2023 21:55:48 +0800 Subject: [PATCH] test notebook only with tag --- .github/workflows/compiler-build.yml | 1 - .github/workflows/jupyter-test.yml | 29 ++++++++++++++++++++++++++++ requirements.test.txt | 3 --- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100755 .github/workflows/jupyter-test.yml diff --git a/.github/workflows/compiler-build.yml b/.github/workflows/compiler-build.yml index 0cd45dbfdd..038585ffdb 100644 --- a/.github/workflows/compiler-build.yml +++ b/.github/workflows/compiler-build.yml @@ -256,7 +256,6 @@ jobs: dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/tflite_basic.xml pytest tests/importer/tflite_/basic/ --doctest-modules --junitxml=test_results/tflite_basic.xml dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/tflite_combine.xml pytest tests/importer/tflite_/combine/ --doctest-modules --junitxml=test_results/tflite_combine.xml dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/tflite_model.xml pytest tests/importer/tflite_/model/ --doctest-modules --junitxml=test_results/tflite_model.xml - dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/jupyter.xml pytest --nbmake examples/user_guide/ --doctest-modules --junitxml=test_results/jupyter.xml dotnet-coverage merge -o coverage.integration.xml -f cobertura -r coverage/*.xml - name: Upload Coverage diff --git a/.github/workflows/jupyter-test.yml b/.github/workflows/jupyter-test.yml new file mode 100755 index 0000000000..56fe7a4f57 --- /dev/null +++ b/.github/workflows/jupyter-test.yml @@ -0,0 +1,29 @@ +on: + push: + tags: + - '*' + +jobs: + test: + name: test-notebook-${{matrix.config.name}} + runs-on: ${{matrix.config.os}} + strategy: + matrix: + config: + - {name: x86_64-macos, os: macos-latest} + - {name: x86_64-linux, os: ubuntu-latest} + - {name: x86_64-windows, os: windows-latest} + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Install dependencies + run: pip install --upgrade pip && pip install jupyterlab pytest nbmake + + - name: Run tests + run: pytest --nbmake examples/user_guide \ No newline at end of file diff --git a/requirements.test.txt b/requirements.test.txt index bd84911bc2..5afc08e761 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -20,6 +20,3 @@ clr_loader==0.2.4 toml==0.10.2 pandas tabulate -nbmake -jupyterlab -scikit-learn \ No newline at end of file