using install script instead of git checkout #311
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: unit-tests | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
- development | |
pull_request: | |
branches: | |
- main | |
- development | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install using script | |
run: | | |
bash <(curl -s https://raw.githubusercontent.com/mila-iqia/cookiecutter-pyml/use_install_script_in_ci/scripts/quick_install.sh) --project-name fancy_new_project | |
- name: python-3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: linting checks | |
working-directory: ./fancy_new_project | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 flake8-docstrings isort | |
sh hooks/pre-commit | |
- name: install project dependencies | |
working-directory: ./fancy_new_project | |
run: | | |
pip install -e . | |
- name: unit tests | |
working-directory: ./fancy_new_project | |
run: | | |
pytest --cov=amlrt-project | |
- name: pytorch-end2end-single | |
working-directory: ./fancy_new_project | |
run: | | |
./tests/end2end_pytorch/run_single.sh | |
- name: pytorch-end2end-orion | |
working-directory: ./fancy_new_project | |
run: | | |
./tests/end2end_pytorch/run_orion.sh | |
- name: type checking | |
working-directory: ./fancy_new_project | |
run: | | |
pytype fancy_new_project/ | |
- name: doc-creation-test | |
working-directory: ./fancy_new_project | |
run: | | |
./tests/test_docs/run.sh |