Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci: TT-394 edit yml instructions
  • Loading branch information
scastillo-jp committed Nov 5, 2021
commit ad3bc45f13d6bbbf3cb38bb4656e0f84c8d4f3c3
58 changes: 30 additions & 28 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
name: CI process for time-tracker-bk app
name: Python Package using Conda

on:
pull_request:
types: [opened, edited, reopened]
branches:
branches:
- master
#push:
#branches: [ master ]

jobs:
ci-test:
name: Unit tests and linting
runs-on: ubuntu-latest
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@master
- name: Initialize Python 3.7
uses: actions/setup-python@v1
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
python-version: 3.7
- name: Add conda to system path
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r V2/requirements.txt
- name: Lint with flake8
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
#- name: Build binary wheel and a source tarball
#run: python setup.py sdist
# - name: Publish distribution to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.test_pypi_password }}
# repository_url: https://test.pypi.org/legacy/
conda env update --file environment.yml --name base
pip install -r V2/requirements.txt
- name: Lint with flake8
run: |
conda install flake8
cd V2
# stop the build if there are Python syntax errors or undefined names
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pytest
pytest
2 changes: 1 addition & 1 deletion V2/.flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
exclude = .git,__pycache__,
exclude = .git,__pycache__,./node_modules
max-complexity = 10
max_line_length = 120