pytest on push #2227
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
name: pytest on push | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 5 * * *" | |
jobs: | |
test_lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install codecov | |
if [ -f requirements/lint-requirements.txt ]; then python -m pip install -r requirements/lint-requirements.txt; fi | |
- name: Print environment info | |
run: | | |
./xgboost_ray/tests/env_info.sh | |
- name: Run format script | |
run: | | |
ls -alp | |
./format.sh --all | |
test_linux_ray_master: | |
runs-on: ubuntu-latest | |
timeout-minutes: 160 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
include: | |
- python-version: "3.8" | |
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl | |
- python-version: "3.9" | |
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl | |
- python-version: "3.10" | |
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install codecov | |
python -m pip install -U ${{ matrix.ray-wheel }} | |
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Print environment info | |
run: | | |
./xgboost_ray/tests/env_info.sh | |
- name: Run tests | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 45 | |
max_attempts: 3 | |
command: bash ./run_ci_tests.sh | |
- name: Run examples | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: bash ./run_ci_examples.sh | |
test_linux_ray_release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 160 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install codecov | |
python -m pip install -U ray | |
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Print environment info | |
run: | | |
./xgboost_ray/tests/env_info.sh | |
- name: Run tests | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 45 | |
max_attempts: 3 | |
command: bash ./run_ci_tests.sh | |
- name: Run examples | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: bash ./run_ci_examples.sh | |
test_linux_compat: | |
# Test compatibility when some optional libraries are missing | |
# Test runs on latest ray release | |
runs-on: ubuntu-latest | |
timeout-minutes: 160 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install codecov | |
python -m pip install -U ray | |
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi | |
- name: Uninstall unavailable dependencies | |
# Disables modin and Ray Tune (via tabulate) | |
run: | | |
python -m pip uninstall -y modin | |
python -m pip uninstall -y tabulate | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Print environment info | |
run: | | |
./xgboost_ray/tests/env_info.sh | |
- name: Run tests | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 45 | |
max_attempts: 3 | |
command: bash ./run_ci_tests.sh --no-tune | |
- name: Run examples | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: bash ./run_ci_examples.sh --no-tune | |
test_linux_cutting_edge: | |
# Tests on cutting edge, i.e. latest Ray master, latest XGBoost master | |
runs-on: ubuntu-latest | |
timeout-minutes: 160 | |
strategy: | |
matrix: | |
# no new versions for xgboost are published for 3.6 | |
python-version: ["3.8", "3.9", "3.10"] | |
include: | |
- python-version: "3.8" | |
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl | |
- python-version: "3.9" | |
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl | |
- python-version: "3.10" | |
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install codecov | |
python -m pip install -U ${{ matrix.ray-wheel }} | |
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi | |
- name: Install Ubuntu system dependencies | |
run: | | |
sudo apt-get install -y --no-install-recommends ninja-build | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Clone XGBoost repo | |
uses: actions/checkout@v3 | |
with: | |
repository: dmlc/xgboost | |
path: xgboost | |
submodules: true | |
- name: Install XGBoost from source | |
shell: bash -l {0} | |
run: | | |
pushd ${GITHUB_WORKSPACE}/xgboost/python-package | |
python --version | |
python setup.py sdist | |
pip install -v ./dist/xgboost-*.tar.gz | |
popd | |
- name: Print environment info | |
run: | | |
./xgboost_ray/tests/env_info.sh | |
- name: Run tests | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 45 | |
max_attempts: 3 | |
command: bash ./run_ci_tests.sh | |
- name: Run examples | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: bash ./run_ci_examples.sh | |
test_linux_xgboost_legacy: | |
# Tests on XGBoost 0.90 and latest Ray release | |
runs-on: ubuntu-latest | |
timeout-minutes: 160 | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install codecov | |
python -m pip install -U ray | |
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Install legacy XGBoost | |
run: | | |
python -m pip install xgboost==0.90 | |
- name: Print environment info | |
run: | | |
./xgboost_ray/tests/env_info.sh | |
- name: Run tests | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 45 | |
max_attempts: 3 | |
command: bash ./run_ci_tests.sh | |
- name: Run examples | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: bash ./run_ci_examples.sh |