123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- name: Tests
- on:
- push:
- branches: [ master ]
- pull_request:
- jobs:
- run_tests:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: [ 3.7, 3.8, 3.9 ]
- timeout-minutes: 15
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python-version }}
- - name: Cache dependencies
- uses: actions/cache@v2
- with:
- path: ~/.cache/pip
- key: Key-v1-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- - name: Build bitsandbytes
- run: |
- pip install bitsandbytes==0.37.0
- - name: Build hivemind
- run: |
- pip install .
- - name: Test
- run: |
- cd tests
- export HIVEMIND_MEMORY_SHARING_STRATEGY=file_descriptor
- pytest --durations=0 --durations-min=1.0 -v
- build_and_test_p2pd:
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v3
- with:
- go-version: '1.18.8'
- check-latest: true
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.8'
- - name: Cache dependencies
- uses: actions/cache@v2
- with:
- path: ~/.cache/pip
- key: Key-v1-3.8-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- - name: Build hivemind
- run: |
- pip install . --global-option=build_py --global-option="--buildgo" --no-use-pep517
- - name: Test
- run: |
- cd tests
- export HIVEMIND_MEMORY_SHARING_STRATEGY=file_descriptor
- pytest -k "p2p" -v
- codecov_in_develop_mode:
- runs-on: ubuntu-latest
- timeout-minutes: 15
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.8'
- - name: Cache dependencies
- uses: actions/cache@v2
- with:
- path: ~/.cache/pip
- key: Key-v1-3.8-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- - name: Build bitsandbytes
- run: |
- pip install bitsandbytes==0.37.0
- - name: Build hivemind
- run: |
- pip install -e . --no-use-pep517
- - name: Test
- run: |
- export HIVEMIND_MEMORY_SHARING_STRATEGY=file_descriptor
- pytest --cov hivemind -v tests
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v1
|