Skip to content

Commit

Permalink
Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
roncv committed Jun 11, 2024
1 parent 62a6af6 commit 6bae313
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/run_pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Run pytest with GitHub Actions
name: pytest

on: [push]

defaults:
run:
working-directory: ./tests

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pytest
run: |
pytest
9 changes: 9 additions & 0 deletions tests/test_sample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
Basic example with pytest...
"""

def inc(x):
return x + 1

def test_answer():
assert inc(4) == 5

0 comments on commit 6bae313

Please sign in to comment.