Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <[email protected]>
  • Loading branch information
YarShev authored Jul 6, 2023
1 parent 6c3bc3b commit f1f3457
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 171 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci-required.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ci-required
on: pull_request
concurrency:
# Cancel other jobs in the same branch. We don't care whether CI passes
# on old commits.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-pr-title:
runs-on: ubuntu-latest
steps:
- uses: Slashgear/[email protected]
with:
# NOTE: If you change the allowed prefixes here, update
# the documentation about them in /docs/development/contributing.rst
regexp: '^(?:FEAT|DOCS|FIX|REFACTOR|TEST|PERF)-#\d+:'
96 changes: 28 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: ci
on: pull_request
on:
pull_request:
paths:
- .github/workflows/**
- unidist/**
- environment.yml
- requirements.txt
- setup.cfg
- setup.py
- versioneer.py
push:
concurrency:
# Cancel other jobs in the same branch. We don't care whether CI passes
# on old commits.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-pr-title:
runs-on: ubuntu-latest
steps:
- uses: Slashgear/[email protected]
with:
# NOTE: If you change the allowed prefixes here, update
# the documentation about them in /docs/developer/contributing.rst
regexp: '^(?:FEAT|DOCS|FIX|REFACTOR|TEST|PERF)-#\d+:'

lint-black:
name: lint (black)
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,15 +44,18 @@ jobs:
- run: pip install flake8 flake8-print
- run: flake8 --enable=T .

test-ubuntu:
needs: [check-pr-title, lint-black, lint-flake8]
test-all:
needs: [lint-black, lint-flake8]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
os:
- ubuntu
- windows
python-version: ["3.8", "3.9"]
backend: ["ray", "mpi", "dask", "pymp", "pyseq"]
env:
UNIDIST_BACKEND: ${{matrix.backend}}
Expand All @@ -64,66 +73,17 @@ jobs:
# we set use-only-tar-bz2 to false in order for conda to properly find new packages to be installed
# for more info see https://github.com/conda-incubator/setup-miniconda/issues/264
use-only-tar-bz2: false
# we install pickle5 here as it is missing in Ray for python 3.7 from PyPI
# remove this when we return Ray back to installation from conda-forge
# see details in https://github.com/modin-project/unidist/issues/219
- name: Pickle5 installation for python 3.7
run: conda install pickle5 -c conda-forge
if: matrix.python-version == '3.7'
- name: Conda environment
run: |
conda info
conda list
- run: python -m pytest unidist/test/
- run: python -m pytest unidist/test/test_actor.py
if: matrix.backend != 'mpi'
# when using a directory to run with mpiexec MPI gets hung after executing tests
# so we run the test files one by one
- run: mpiexec -n 1 python -m pytest unidist/test/test_actor.py
if: matrix.backend == 'mpi'
- run: mpiexec -n 1 python -m pytest unidist/test/test_async_actor.py
if: matrix.backend == 'mpi'
- run: mpiexec -n 1 python -m pytest unidist/test/test_task.py
if: matrix.backend == 'mpi'
- run: mpiexec -n 1 python -m pytest unidist/test/test_general.py
if: matrix.backend == 'mpi'

test-windows:
needs: [check-pr-title, lint-black, lint-flake8]
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
backend: ["ray", "mpi", "dask", "pymp", "pyseq"]
env:
UNIDIST_BACKEND: ${{matrix.backend}}
name: test-windows (backend ${{matrix.backend}}, python ${{matrix.python-version}})
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: unidist
environment-file: environment.yml
python-version: ${{matrix.python-version}}
channel-priority: strict
# we set use-only-tar-bz2 to false in order for conda to properly find new packages to be installed
# for more info see https://github.com/conda-incubator/setup-miniconda/issues/264
use-only-tar-bz2: false
# we install pickle5 here as it is missing in Ray for python 3.7 from PyPI
# remove this when we return Ray back to installation from conda-forge
# see details in https://github.com/modin-project/unidist/issues/219
- name: Pickle5 installation for python 3.7
run: conda install pickle5 -c conda-forge
if: matrix.python-version == '3.7'
- name: Conda environment
run: |
conda info
conda list
- run: python -m pytest unidist/test/
- run: python -m pytest unidist/test/test_async_actor.py
if: matrix.backend != 'mpi'
- run: python -m pytest unidist/test/test_task.py
if: matrix.backend != 'mpi'
- run: python -m pytest unidist/test/test_general.py
if: matrix.backend != 'mpi'
# when using a directory to run with mpiexec MPI gets hung after executing tests
# so we run the test files one by one
Expand Down
98 changes: 0 additions & 98 deletions .github/workflows/push.yml

This file was deleted.

7 changes: 2 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ channels:
- conda-forge
dependencies:
# for development
- cloudpickle
- ray-default>=1.13.0
- dask>=2.22.0
- distributed>=2.22.0
- mpi4py>=3.0.3
- msgpack-python>=1.0.0
- cloudpickle
- packaging
- psutil
- pytest
# for downloading packages from PyPI
- pip
- pip:
# for development
# we install ray from PyPI for now as the package is broken in conda-forge
# see details in https://github.com/modin-project/unidist/issues/219
- ray[default]>=1.13.0
# for building the documentation
- sphinx
- sphinx_rtd_theme
Expand Down

0 comments on commit f1f3457

Please sign in to comment.