forked from axolotl-ai-cloud/axolotl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2e passing tests (axolotl-ai-cloud#576)
* run e2e tests after all other checks have passed * tweak tests so they get run on PRs or push to main * change dependent action for chcecking * one test workflow to rule them all * no need for custom action, just use needs * whoops, python version should be a string * e2e tests can run on any available gpu
- Loading branch information
Showing
3 changed files
with
44 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
|
||
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/ |