Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add CI tests on main push/PR #27

Merged
merged 4 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@
<img src="https://badge.fury.io/py/ng_ai.svg" alt="PyPI version">
</a>

<a href="https://www.python.org/downloads/release/python-360/" target="_blank">
<!-- <a href="https://www.python.org/downloads/release/python-360/" target="_blank">
<img src="https://img.shields.io/badge/python-3.6%2B-blue.svg" alt="Python">
</a>
</a> -->

<a href="https://pdm.fming.dev" target="_blank">
<img src="https://img.shields.io/badge/pdm-managed-blueviolet" alt="pdm-managed">
</a>

<a href="https://github.com/wey-gu/nebulagraph-ai/actions/workflows/ci.yml">
<img src="https://github.com/wey-gu/nebulagraph-ai/actions/workflows/ci.yml/badge.svg" alt="Tests">
</a>

<img src="https://img.shields.io/badge/Python-3.9-blue.svg" alt="Python 3.9">

</p>

---
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down