-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactor integration tests into matrix #3618
Changes from 2 commits
5151fa3
7ce9c39
d20681b
e1f0621
d4c74f2
534ee42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,244 +199,26 @@ jobs: | |
name: Unit Test Results (Python ${{ matrix.python-version }} ${{ matrix.test-markers }}) | ||
path: pytest.xml | ||
|
||
integration-tests-a: | ||
name: Integration Tests (A) | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.LUDWIG_TESTS_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.LUDWIG_TESTS_AWS_SECRET_ACCESS_KEY }} | ||
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | ||
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | ||
IS_NOT_FORK: ${{ !(github.event.pull_request.base.repo.full_name == 'ludwig-ai/ludwig' && github.event.pull_request.head.repo.fork) }} | ||
|
||
services: | ||
minio: | ||
image: fclairamb/minio-github-actions | ||
env: | ||
MINIO_ACCESS_KEY: minio | ||
MINIO_SECRET_KEY: minio123 | ||
ports: | ||
- 9000:9000 | ||
|
||
timeout-minutes: 90 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Setup Linux | ||
if: runner.os == 'linux' | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y cmake libsndfile1 | ||
|
||
- name: Setup macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install libuv | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version | ||
pip --version | ||
python -m pip install -U pip | ||
|
||
# remove torch and ray from the dependencies so we can add them depending on the matrix args for the job. | ||
cat requirements.txt | sed '/^torch[>=<\b]/d' | sed '/^torchtext/d' | sed '/^torchvision/d' | sed '/^torchaudio/d' > requirements-temp && mv requirements-temp requirements.txt | ||
cat requirements_distributed.txt | sed '/^ray[\[]/d' | ||
pip install torch==2.0.0 torchtext torchvision torchaudio | ||
pip install ray==2.3.0 | ||
pip install '.[test]' | ||
pip list | ||
shell: bash | ||
|
||
- name: Integration Tests (A) | ||
run: | | ||
RUN_PRIVATE=$IS_NOT_FORK LUDWIG_TEST_SUITE_TIMEOUT_S=7200 pytest -v --timeout 300 --durations 100 -m "not slow and not combinatorial and not horovod and not llm and integration_tests_a" --junitxml pytest.xml tests/integration_tests | ||
|
||
integration-tests-b: | ||
name: Integration Tests (B) | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.LUDWIG_TESTS_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.LUDWIG_TESTS_AWS_SECRET_ACCESS_KEY }} | ||
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | ||
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | ||
IS_NOT_FORK: ${{ !(github.event.pull_request.base.repo.full_name == 'ludwig-ai/ludwig' && github.event.pull_request.head.repo.fork) }} | ||
|
||
services: | ||
minio: | ||
image: fclairamb/minio-github-actions | ||
env: | ||
MINIO_ACCESS_KEY: minio | ||
MINIO_SECRET_KEY: minio123 | ||
ports: | ||
- 9000:9000 | ||
|
||
timeout-minutes: 90 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Setup Linux | ||
if: runner.os == 'linux' | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y cmake libsndfile1 | ||
|
||
- name: Setup macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install libuv | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version | ||
pip --version | ||
python -m pip install -U pip | ||
|
||
# remove torch and ray from the dependencies so we can add them depending on the matrix args for the job. | ||
cat requirements.txt | sed '/^torch[>=<\b]/d' | sed '/^torchtext/d' | sed '/^torchvision/d' | sed '/^torchaudio/d' > requirements-temp && mv requirements-temp requirements.txt | ||
cat requirements_distributed.txt | sed '/^ray[\[]/d' | ||
pip install torch==2.0.0 torchtext torchvision torchaudio | ||
pip install ray==2.3.0 | ||
pip install '.[test]' | ||
pip list | ||
shell: bash | ||
|
||
- name: Integration Tests (B) | ||
run: | | ||
RUN_PRIVATE=$IS_NOT_FORK LUDWIG_TEST_SUITE_TIMEOUT_S=7200 pytest -v --timeout 300 --durations 100 -m "not slow and not combinatorial and not horovod and not llm and integration_tests_b" --junitxml pytest.xml tests/integration_tests | ||
|
||
integration-tests-c: | ||
name: Integration Tests (C) | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.LUDWIG_TESTS_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.LUDWIG_TESTS_AWS_SECRET_ACCESS_KEY }} | ||
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | ||
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | ||
IS_NOT_FORK: ${{ !(github.event.pull_request.base.repo.full_name == 'ludwig-ai/ludwig' && github.event.pull_request.head.repo.fork) }} | ||
|
||
services: | ||
minio: | ||
image: fclairamb/minio-github-actions | ||
env: | ||
MINIO_ACCESS_KEY: minio | ||
MINIO_SECRET_KEY: minio123 | ||
ports: | ||
- 9000:9000 | ||
|
||
timeout-minutes: 90 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Setup Linux | ||
if: runner.os == 'linux' | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y cmake libsndfile1 | ||
|
||
- name: Setup macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install libuv | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version | ||
pip --version | ||
python -m pip install -U pip | ||
|
||
# remove torch and ray from the dependencies so we can add them depending on the matrix args for the job. | ||
cat requirements.txt | sed '/^torch[>=<\b]/d' | sed '/^torchtext/d' | sed '/^torchvision/d' | sed '/^torchaudio/d' > requirements-temp && mv requirements-temp requirements.txt | ||
cat requirements_distributed.txt | sed '/^ray[\[]/d' | ||
pip install torch==2.0.0 torchtext torchvision torchaudio | ||
pip install ray==2.3.0 | ||
pip install '.[test]' | ||
pip list | ||
shell: bash | ||
|
||
- name: Integration Tests (C) | ||
run: | | ||
RUN_PRIVATE=$IS_NOT_FORK LUDWIG_TEST_SUITE_TIMEOUT_S=7200 pytest -v --timeout 300 --durations 100 -m "not slow and not combinatorial and not horovod and not llm and integration_tests_c" --junitxml pytest.xml tests/integration_tests | ||
|
||
integration-tests-d: | ||
name: Integration Tests (D) | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.LUDWIG_TESTS_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.LUDWIG_TESTS_AWS_SECRET_ACCESS_KEY }} | ||
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | ||
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | ||
IS_NOT_FORK: ${{ !(github.event.pull_request.base.repo.full_name == 'ludwig-ai/ludwig' && github.event.pull_request.head.repo.fork) }} | ||
|
||
services: | ||
minio: | ||
image: fclairamb/minio-github-actions | ||
env: | ||
MINIO_ACCESS_KEY: minio | ||
MINIO_SECRET_KEY: minio123 | ||
ports: | ||
- 9000:9000 | ||
|
||
timeout-minutes: 90 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Setup Linux | ||
if: runner.os == 'linux' | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y cmake libsndfile1 | ||
|
||
- name: Setup macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install libuv | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version | ||
pip --version | ||
python -m pip install -U pip | ||
|
||
# remove torch and ray from the dependencies so we can add them depending on the matrix args for the job. | ||
cat requirements.txt | sed '/^torch[>=<\b]/d' | sed '/^torchtext/d' | sed '/^torchvision/d' | sed '/^torchaudio/d' > requirements-temp && mv requirements-temp requirements.txt | ||
cat requirements_distributed.txt | sed '/^ray[\[]/d' | ||
pip install torch==2.0.0 torchtext torchvision torchaudio | ||
pip install ray==2.3.0 | ||
pip install '.[test]' | ||
pip list | ||
shell: bash | ||
|
||
- name: Integration Tests (D) | ||
run: | | ||
RUN_PRIVATE=$IS_NOT_FORK LUDWIG_TEST_SUITE_TIMEOUT_S=7200 pytest -v --timeout 300 --durations 100 -m "not slow and not combinatorial and not horovod and not llm and integration_tests_d" --junitxml pytest.xml tests/integration_tests | ||
|
||
integration-tests-e: | ||
name: Integration Tests (E) | ||
integration-tests: | ||
name: ${{ matrix.test-markers }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-markers: | ||
- "integration_tests_a" | ||
- "integration_tests_b" | ||
- "integration_tests_c" | ||
- "integration_tests_d" | ||
- "integration_tests_e" | ||
|
||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.LUDWIG_TESTS_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.LUDWIG_TESTS_AWS_SECRET_ACCESS_KEY }} | ||
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | ||
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | ||
IS_NOT_FORK: ${{ !(github.event.pull_request.base.repo.full_name == 'ludwig-ai/ludwig' && github.event.pull_request.head.repo.fork) }} | ||
MARKERS: ${{ matrix.test-markers }} | ||
|
||
services: | ||
minio: | ||
|
@@ -480,9 +262,9 @@ jobs: | |
pip list | ||
shell: bash | ||
|
||
- name: Integration Tests (E) | ||
- name: Integration Tests | ||
run: | | ||
RUN_PRIVATE=$IS_NOT_FORK LUDWIG_TEST_SUITE_TIMEOUT_S=7200 pytest -v --timeout 300 --durations 100 -m "not slow and not combinatorial and not horovod and not llm and not integration_tests_a and not integration_tests_b and not integration_tests_c and not integration_tests_d" --junitxml pytest.xml tests/integration_tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justinxzhao why is it that only test suite E had all these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, this is because tests for groups a/b/c/d, are explicitly marked with |
||
RUN_PRIVATE=$IS_NOT_FORK LUDWIG_TEST_SUITE_TIMEOUT_S=7200 pytest -v --timeout 300 --durations 100 -m "not slow and not combinatorial and not horovod and not llm and $MARKERS" --junitxml pytest.xml tests/integration_tests | ||
|
||
llm-tests: | ||
name: LLM Tests | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work if we want to keep the markers unchanged: