diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 09c26c2a67..0000000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: E2E -on: - workflow_dispatch: - -jobs: - e2e-test: - runs-on: [self-hosted, gpu] - strategy: - fail-fast: false - matrix: - python_version: ["3.10"] - timeout-minutes: 10 - - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python_version }} - cache: 'pip' # caching pip dependencies - - - name: Install dependencies - run: | - pip3 install -e . - pip3 install flash-attn - pip3 install -r requirements-tests.txt - - - name: Run e2e tests - run: | - pytest tests/e2e/ diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 626edc6868..0000000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.9" - cache: 'pip' # caching pip dependencies - - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a2ee392626..017c1b1b6b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,26 @@ -name: PyTest +name: Tests on: + # check on push/merge to main, PRs, and manual triggers push: + branches: + - "main" pull_request: + workflow_dispatch: jobs: - test: + pre-commit: + name: pre-commit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + cache: 'pip' # caching pip dependencies + - uses: pre-commit/action@v3.0.0 + + pytest: + name: PyTest runs-on: ubuntu-latest strategy: fail-fast: false @@ -30,3 +46,29 @@ jobs: - name: Run tests run: | pytest --ignore=tests/e2e/ tests/ + + e2e-test: + name: E2E Tests + runs-on: [self-hosted, gpu] + timeout-minutes: 20 + needs: [pre-commit, pytest] + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: 'pip' # caching pip dependencies + + - name: Install dependencies + run: | + pip3 install -e . + pip3 install flash-attn + pip3 install -r requirements-tests.txt + + - name: Run e2e tests + run: | + pytest tests/e2e/