Skip to content

Commit

Permalink
Add gitignore and a draft of github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
drgarcia1986 committed Jul 31, 2020
1 parent 2952054 commit 0481645
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 70 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: main

on: [push]

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8.5

- name: Install Poetry
uses: dschep/[email protected]

- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: make install-dev
if: steps.cache.outputs.cache-hit != 'true'

- name: Lints
run: make lint

- name: Unit Tests
run: make test
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.manifest
*.spec
pip-log.txt
pip-delete-this-directory.txt
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
*.mo
*.pot
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
instance/
.webassets-cache
.scrapy
docs/_build/
.pybuilder/
target/
.ipynb_checkpoints
profile_default/
ipython_config.py
__pypackages__/
celerybeat-schedule
celerybeat.pid
*.sage.py
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.spyderproject
.spyproject
.ropeproject
/site
.mypy_cache/
.dmypy.json
dmypy.json
.pyre/
.pytype/
cython_debug/
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
install:
@poetry install

install-dev:
@poetry install --extras "all"

test:
@pytest
@poetry run pytest

lint:
@flake8 shared_memory_dict
@isort --check shared_memory_dict
@black --skip-string-normalization --line-length 79 --check shared_memory_dict
@mypy shared_memory_dict
@poetry run flake8 shared_memory_dict
@poetry run isort --check shared_memory_dict
@poetry run black --skip-string-normalization --line-length 79 --check shared_memory_dict
@poetry run mypy shared_memory_dict

coverage:
@pytest --cov shared_memory_dict/ --cov-report=term-missing --cov-report=xml
@poetry run pytest --cov shared_memory_dict/ --cov-report=term-missing --cov-report=xml
Loading

0 comments on commit 0481645

Please sign in to comment.