Skip to content

Commit

Permalink
Add pull request checks
Browse files Browse the repository at this point in the history
  • Loading branch information
remisalmon committed Oct 28, 2023
1 parent 00af3c6 commit 7fa8969
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pull request checks

on:
pull_request:
branches:
- master

jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4

- name: Run tests
run: |
python -m doctest -o IGNORE_EXCEPTION_DETAIL -f tests/tests.txt
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source venv/bin/activate
python -m pip install -U pip setuptools
python -m pip install -r requirements.txt

python -m doctest -o IGNORE_EXCEPTION_DETAIL -f tests/tests.txt || exit 1
python -m doctest -o IGNORE_EXCEPTION_DETAIL -f tests/tests.txt
2 changes: 1 addition & 1 deletion tests/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Traceback (most recent call last):
...
ValueError: ...

>>> gpx_interpolate(test_data, num=-1)
>>> gpx_interpolate(test_data, num=0)
Traceback (most recent call last):
...
ValueError: ...
Expand Down

0 comments on commit 7fa8969

Please sign in to comment.