diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b018d5ca7..3ee035a55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - name: Run checkstyle run: make checkstyle - unit-tests: + tests: runs-on: ubuntu-latest needs: [checkstyle] env: @@ -63,30 +63,4 @@ jobs: - name: Run unit tests run: | - modal run dev.modal.unit_tests - - convergence-tests: - runs-on: ubuntu-latest - needs: [unit-tests] - - env: - MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} - MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install modal - - - name: Run convergence tests - run: | - modal run dev.modal.conv_tests \ No newline at end of file + modal run dev.modal.tests \ No newline at end of file diff --git a/dev/modal/conv_tests.py b/dev/modal/tests.py similarity index 73% rename from dev/modal/conv_tests.py rename to dev/modal/tests.py index 2773451de..1b52b40db 100644 --- a/dev/modal/conv_tests.py +++ b/dev/modal/tests.py @@ -8,15 +8,15 @@ ROOT_PATH / "pyproject.toml", optional_dependencies=["dev"] ) -app = modal.App("liger_convergence_test", image=image) +app = modal.App("liger_tests", image=image) # mount: add local files to the remote container repo = modal.Mount.from_local_dir(ROOT_PATH, remote_path="/root/liger-kernel") -@app.function(gpu="A10G", mounts=[repo], timeout=60 * 20) -def liger_convergence_test(): +@app.function(gpu="A10G", mounts=[repo], timeout=60 * 10) +def liger_tests(): import subprocess - subprocess.run(["pip", "install", "-e", "."], check=True, cwd="/root/liger-kernel") + subprocess.run(["make", "test"], check=True, cwd="/root/liger-kernel") subprocess.run(["make", "test-convergence"], check=True, cwd="/root/liger-kernel") diff --git a/dev/modal/unit_tests.py b/dev/modal/unit_tests.py deleted file mode 100644 index 9a2fef4e5..000000000 --- a/dev/modal/unit_tests.py +++ /dev/null @@ -1,22 +0,0 @@ -from pathlib import Path - -import modal - -ROOT_PATH = Path(__file__).parent.parent.parent - -image = modal.Image.debian_slim().pip_install_from_pyproject( - ROOT_PATH / "pyproject.toml", optional_dependencies=["dev"] -) - -app = modal.App("liger_unit_test", image=image) - -# mount: add local files to the remote container -repo = modal.Mount.from_local_dir(ROOT_PATH, remote_path="/root/liger-kernel") - - -@app.function(gpu="A10G", mounts=[repo], timeout=60 * 5) -def liger_unit_test(): - import subprocess - - subprocess.run(["pip", "install", "-e", "."], check=True, cwd="/root/liger-kernel") - subprocess.run(["make", "test"], check=True, cwd="/root/liger-kernel")