add networkx in requirements_dev, modify ci #181
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: Continuous Integration | |
on: [push] | |
jobs: | |
format: | |
name: Format check | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install black | |
run: cat tools/requirements_dev.txt | grep black | xargs pip install | |
- name: Format | |
run: tools/format.sh --checkonly | |
lint: | |
name: Lint check | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install pylint | |
run: cat tools/requirements_dev.txt | grep "pylint\|astroid" | xargs pip install | |
- name: Check | |
run: | | |
tools/lint.sh --version | |
tools/lint.sh | |
mypy: | |
name: mypy check | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install mypy | |
run: cat tools/requirements_dev.txt | grep "mypy\|torch" | xargs pip install | |
- name: Check | |
run: | | |
rm bluefoglite/common/tcp/message_pb2.py | |
tools/mypy.sh --version | |
tools/mypy.sh | |
ubuntu-unit-test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install BlueFogLite | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
cat tools/requirements_dev.txt | grep pytest | xargs pip install | |
python -m pip install -e . | |
- name: Unit Test | |
run: | | |
timeout 3m pytest -s -vv bluefoglite test | |
timeout 3m bflrun -np 4 pytest -s -vv test/allreduce_broadcast.py | |
macos-unit-test: | |
runs-on: macos-11 | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install brew coreutils | |
run: brew install coreutils # for timeout command | |
- name: Install BlueFogLite | |
run: | | |
python3 -m pip install -r requirements.txt | |
cat tools/requirements_dev.txt | grep pytest | xargs pip install | |
python3 -m pip install -e . | |
- name: Unit Test | |
run: | | |
timeout 3m pytest -s -vv bluefoglite test | |
timeout 3m bflrun -np 4 pytest -s -vv test/allreduce_broadcast.py |