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