1- name : CI process for time-tracker-bk app
1+ name : Python Package using Conda
22
3- on :
3+ on :
44 pull_request :
55 types : [opened, edited, reopened]
6- branches :
7- - master
8- # push:
9- # branches: [ master ]
6+ branches : [ master ]
107
118jobs :
12- ci-test :
13- name : Unit tests and linting
14- runs-on : ubuntu-latest
9+ build-linux :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ max-parallel : 5
1513
16- steps :
17- - uses : actions/checkout@master
18- - name : Initialize Python 3.7
19- uses : actions/setup-python@v1
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Set up Python 3.7
17+ uses : actions/setup-python@v2
2018 with :
21- python-version : 3.7
22- - name : Install dependencies
19+ python-version : 3.7
20+ - name : Add conda to system path
2321 run : |
24- python -m pip install --upgrade pip
25- pip install flake8
26- pip install -r V2/requirements.txt
27- - name : Lint with flake8
22+ # $CONDA is an environment variable pointing to the root of the miniconda directory
23+ echo $CONDA/bin >> $GITHUB_PATH
24+ - name : Install dependencies
2825 run : |
29- # stop the build if there are Python syntax errors or undefined names
30- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
31- # exit-zero treats all errors as warnings.
32- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
33- # - name: Build binary wheel and a source tarball
34- # run: python setup.py sdist
35- # - name: Publish distribution to Test PyPI
36- # uses: pypa/gh-action-pypi-publish@master
37- # with:
38- # password: ${{ secrets.test_pypi_password }}
39- # repository_url: https://test.pypi.org/legacy/
26+ conda env update --file environment.yml --name base
27+ pip install -r V2/requirements.txt
28+ - name : Lint with flake8
29+ run : |
30+ conda install flake8
31+ cd V2
32+ # stop the build if there are Python syntax errors or undefined names
33+ #flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+ flake8 . --show-source --statistics
35+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36+ #flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+ - name : Test with pytest
38+ run : |
39+ conda install pytest
40+ pytest
0 commit comments