Skip to content

Commit b132de5

Browse files
Merge pull request #195 from chinapandaman/PPF-194
PPF-194: tests should be run on windows as well
2 parents 194ce41 + 540fab2 commit b132de5

File tree

6 files changed

+5
-22
lines changed

6 files changed

+5
-22
lines changed

.github/workflows/python-package.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ on:
1212
jobs:
1313
build:
1414

15-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18+
os: [ubuntu-latest, windows-latest]
1819
python-version: [3.6, 3.7, 3.8, 3.9]
1920

2021
steps:
@@ -26,16 +27,7 @@ jobs:
2627
- name: Install dependencies
2728
run: |
2829
python -m pip install --upgrade pip
29-
pip install flake8 pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31-
- name: Lint with flake8
32-
run: |
33-
# stop the build if there are Python syntax errors or undefined names
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37-
- name: Add source root to PATH
38-
run: echo "PYTHONPATH=/home/runner/work/PyPDFForm/PyPDFForm" >> $GITHUB_ENV
30+
pip install -r requirements.txt
3931
- name: Test with pytest
4032
run: |
4133
pytest

PyPDFForm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
PyPDFForm = Wrapper
66

7-
__version__ = "0.3.3"
7+
__version__ = "0.3.4"

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,7 @@ and install all needed dependencies if you are running Linux:
7777
make build-all
7878
```
7979

80-
In order to run tests, source root needs to be added to PYTHONPATH by running
81-
the following command at project root:
82-
83-
```shell script
84-
export PYTHONPATH=$PYTHONPATH:$(pwd)/PyPDFForm
85-
```
86-
87-
From there run tests using:
80+
Activate your virtual environment and run tests using:
8881

8982
```shell script
9083
pytest -v

conftest.py

Whitespace-only changes.

scripts/test.sh

-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ if [[ "$VIRTUAL_ENV" == "" ]]; then
22
source "./venv-linux/bin/activate"
33
fi
44

5-
PYTHONPATH=$PYTHONPATH:$(pwd)/PyPDFForm
6-
export PYTHONPATH
75
pytest -v

0 commit comments

Comments
 (0)