Skip to content

Commit

Permalink
ci(test): add main test for hm-skypilot (#13590)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao committed Jan 1, 2024
1 parent d277378 commit 1838ebe
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 28 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
hm-pyvista-mount-saint-helens: ${{ steps.filter.outputs.hm-pyvista-mount-saint-helens }}
hm-rasa: ${{ steps.filter.outputs.hm-rasa }}
hm-serial: ${{ steps.filter.outputs.hm-serial }}
hm-skypilot: ${{ steps.filter.outputs.hm-skypilot }}
hm-spark-find-retired-people-scala: ${{ steps.filter.outputs.hm-spark-find-retired-people-scala }}
hm-spark-find-taxi-top-routes: ${{ steps.filter.outputs.hm-spark-find-taxi-top-routes }}
hm-spark-find-taxi-top-routes-sql: ${{ steps.filter.outputs.hm-spark-find-taxi-top-routes-sql }}
Expand Down Expand Up @@ -156,6 +157,9 @@ jobs:
hm-serial:
- '.github/workflows/test.yml'
- 'hm-serial/**'
hm-skypilot:
- '.github/workflows/test.yml'
- 'hm-skypilot/**'
hm-spark-find-retired-people-scala:
- '.github/workflows/test.yml'
- 'hm-spark/applications/find-retired-people-scala/**'
Expand Down Expand Up @@ -1356,6 +1360,38 @@ jobs:
with:
directory: hm-serial

skypilot-test:
name: SkyPilot | Test
needs: detect-changes
if: ${{ needs.detect-changes.outputs.hm-skypilot == 'true' }}
runs-on: ubuntu-22.04
environment: test
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: hm-skypilot/pyproject.toml
cache: poetry
cache-dependency-path: hm-skypilot/poetry.lock
- name: Install dependencies
working-directory: hm-skypilot
run: |
poetry install --no-root
- name: Test
working-directory: hm-skypilot
run: |
poetry run poe test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: hm-skypilot

supervision-detect-objects-test:
name: supervision (detect-objects) | Test
needs: detect-changes
Expand Down
7 changes: 5 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,14 @@ pull_request_rules:
- check-success=PyVista (mount-saint-helens) | Test
- check-skipped=PyVista (mount-saint-helens) | Test
- or:
- check-success=Reinforcement Learning (cart-pole) | Test | Test
- check-skipped=Reinforcement Learning (cart-pole) | Test | Test
- check-success=Reinforcement Learning (cart-pole) | Test
- check-skipped=Reinforcement Learning (cart-pole) | Test
- or:
- check-success=Serial | Test
- check-skipped=Serial | Test
- or:
- check-success=SkyPilot | Test
- check-skipped=SkyPilot | Test
- or:
- check-success=supervision (detect-objects) | Test
- check-skipped=supervision (detect-objects) | Test
Expand Down
7 changes: 6 additions & 1 deletion hm-skypilot/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
poetry-env-use:
poetry env use python3.10
poetry env use python3.11
poetry-update-lock-file:
poetry lock --no-update
poetry-install:
poetry install --no-root

poetry-run-test:
poetry run poe test
poetry-run-test-coverage:
poetry run poe test-coverage

sky-launch:
poetry run sky launch skypilot.yaml \
--cluster=hm-skypilot-cluster \
Expand Down
10 changes: 10 additions & 0 deletions hm-skypilot/main_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest


class TestMain(unittest.TestCase):
def test_main(self):
self.assertTrue(True)


if __name__ == "__main__":
unittest.main()
Loading

0 comments on commit 1838ebe

Please sign in to comment.