From d2feee823138a7d19ef75976e87289e5d3c6a8d7 Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Wed, 22 Mar 2023 22:21:10 +0800 Subject: [PATCH 1/4] feat: add CI tests on main push/PR --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..88e42c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ + +name: Tests + +on: + pull_request: + paths-ignore: + - "docs/**" + - "*.md" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "*.md" + +jobs: + Testing: + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: [3.9] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v3 + - name: Set up PDM + uses: pdm-project/setup-pdm@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Run Install + run: pdm install + - name: Run Lint + run: pdm run lint + - name: Run Unit Tests + run: pdm run test + - name: Run Integration Tests + run: pdm run int-test From b4642842dec1c2895d18ac98ab04d93c66f70ae1 Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Wed, 22 Mar 2023 22:27:54 +0800 Subject: [PATCH 2/4] fix: docker run should be w/o tty --- README.md | 9 +++++++++ pyproject.toml | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 52f9f04..8faecb8 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,15 @@ pdm-managed + + Tests + + +Python 3.9 + + +[![Tests](https://github.com/wey-gu/nebulagraph-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/wey-gu/nebulagraph-ai/actions/workflows/ci.yml) +

--- diff --git a/pyproject.toml b/pyproject.toml index 662db2f..49e6059 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,11 +74,11 @@ shell = """ echo "Build and Install ng_ai to jupyter_spark, master_spark container" pdm build --dest tests/integration/setup/build/ - docker exec -it master_spark sh -c 'pip3 uninstall ng_ai -y' - docker exec -it master_spark sh -c 'pip3 install /root/build/*.whl' + docker exec master_spark sh -c 'pip3 uninstall ng_ai -y' + docker exec master_spark sh -c 'pip3 install /root/build/*.whl' docker restart master_spark - docker exec -it jupyter_spark sh -c 'pip3 uninstall ng_ai -y' - docker exec -it jupyter_spark sh -c 'pip3 install /root/build/*.whl' + docker exec jupyter_spark sh -c 'pip3 uninstall ng_ai -y' + docker exec jupyter_spark sh -c 'pip3 install /root/build/*.whl' docker restart jupyter_spark sleep 7 echo "Run integration tests" From c9fe4fd379271e96ef6990c4261d12f04f994f9b Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Wed, 22 Mar 2023 22:29:30 +0800 Subject: [PATCH 3/4] wrong badge fixed --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 8faecb8..3cc752a 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,6 @@ Python 3.9 - -[![Tests](https://github.com/wey-gu/nebulagraph-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/wey-gu/nebulagraph-ai/actions/workflows/ci.yml) -

--- From aee5c91818452442a348eaedef18387a6634025f Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Wed, 22 Mar 2023 22:36:19 +0800 Subject: [PATCH 4/4] fix: removed 3.6+ support badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3cc752a..f53c562 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ PyPI version - + pdm-managed