Skip to content

Commit

Permalink
Merge pull request #33 from Eerovil/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
Eerovil committed Dec 8, 2019
2 parents b425d91 + 6d73d10 commit ed57bb5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 27 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Python application

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirement*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-testing.txt
- name: Lint with flake8
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. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-line-length=100 --statistics
- name: Lint with mypy
run: |
mypy tracklater
- name: Test with pytest
run: |
pytest --cov=. --cov-report term
codecov
env:
CODECOV_TOKEN: 9a7b0691-eff9-49e2-89d8-15c51a8df636
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions tracklater/settings_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Dummy(object):
settings_wrapper: Any = Dummy()

if not os.path.exists(user_config_path):
os.mkdir(appdirs.user_config_dir())
shutil.copy(os.path.join(DIRECTORY, 'example_settings.json'), user_config_path)
logger.error("No user settings file! Modify the example settings created (path: %s)",
user_config_path)
Expand Down

0 comments on commit ed57bb5

Please sign in to comment.