Merge pull request #7 from dantp-ai/solution/task-0-2 #11
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: Python package | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
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 dependencies | |
run: | | |
sudo apt-get install graphviz | |
python -m pip install --upgrade pip | |
pip install flake8 pytest pep8-naming | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 --ignore "N801, E203, E266, E501, W503, F812, F401, F841, E741, N803, N802, N806" minitorch/ tests/ project/ | |
- name: Test Module 0 | |
run: | | |
echo "Module 0" | |
pytest tests -x -m task0_1 | |
pytest tests -x -m task0_2 | |
pytest tests -x -m task0_3 | |
pytest tests -x -m task0_4 | |
- name: Test Module 1 | |
run: | | |
echo "Module 1" | |
pytest tests -x -m task1_1 | |
pytest tests -x -m task1_2 | |
pytest tests -x -m task1_3 | |
pytest tests -x -m task1_4 | |
- name: Test Module 2 | |
run: | | |
echo "Module 2" | |
pytest tests -x -m task2_1 | |
pytest tests -x -m task2_2 | |
pytest tests -x -m task2_3 | |
pytest tests -x -m task2_4 | |
- name: Test Module 3 | |
run: | | |
echo "Module 3" | |
pytest tests -x -m task3_1 | |
pytest tests -x -m task3_2 | |
pytest tests -x -m task3_3 | |
pytest tests -x -m task3_4 | |
- name: Test Module 4 | |
run: | | |
echo "Module 4" | |
pytest tests -x -m task4_1 | |
pytest tests -x -m task4_2 | |
pytest tests -x -m task4_3 | |
pytest tests -x -m task4_4 |