Skip to content

Commit 902e3b0

Browse files
authored
ci: TT-94 resolve problems with syntax.
1 parent 92ab9a1 commit 902e3b0

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed
Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
name: CI process for time-tracker-bk app
1+
name: Python Package using Conda
22

3-
on:
4-
pull_request:
5-
types: [opened, edited, reopened]
6-
branches:
7-
- master
8-
#push:
9-
#branches: [ master ]
3+
on:
4+
push:
5+
branches: [ master ]
106

117
jobs:
12-
ci-test:
13-
name: Unit tests and linting
14-
runs-on: ubuntu-latest
8+
build-linux:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
max-parallel: 5
1512

16-
steps:
17-
- uses: actions/checkout@master
18-
- name: Initialize Python 3.7
19-
uses: actions/setup-python@v1
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python 3.7
16+
uses: actions/setup-python@v2
2017
with:
21-
python-version: 3.7
22-
- name: Install dependencies
18+
python-version: 3.7
19+
- name: Add conda to system path
2320
run: |
24-
python -m pip install --upgrade pip
25-
pip install flake8
26-
pip install -r V2/requirements.txt
27-
- name: Lint with flake8
21+
# $CONDA is an environment variable pointing to the root of the miniconda directory
22+
echo $CONDA/bin >> $GITHUB_PATH
23+
- name: Install dependencies
2824
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/
25+
conda env update --file environment.yml --name base
26+
pip install -r V2/requirements.txt
27+
- name: Lint with flake8
28+
run: |
29+
conda install flake8
30+
# stop the build if there are Python syntax errors or undefined names
31+
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32+
flake8 . --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
- name: Test with pytest
36+
run: |
37+
conda install pytest
38+
pytest

0 commit comments

Comments
 (0)