Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tests and CI workflow #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test

on: [push]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.7]
os: [ubuntu-latest, windows-latest]
vanyakosmos marked this conversation as resolved.
Show resolved Hide resolved

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test
run: pytest -v -n auto --cov=my_first_calculator --cov-fail-under 69 tests.py
vanyakosmos marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk

# Coverage
.coverage
htmlcov

# Environment
.venv
.env
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest
pytest-cov
pytest-xdist
Loading