File tree Expand file tree Collapse file tree 4 files changed +73
-2
lines changed Expand file tree Collapse file tree 4 files changed +73
-2
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+ name : Python application
5+
6+ on :
7+ push :
8+ branches : [ "master" ]
9+ pull_request :
10+ branches : [ "master" ]
11+
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ build :
17+ environment : deploy
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - uses : actions/checkout@v3
22+ - name : Set up Python 3.9
23+ uses : actions/setup-python@v3
24+ with :
25+ python-version : " 3.9"
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install pytest coverage codecov
30+ pip install .
31+ - name : Test with pytest
32+ env :
33+ SYPHT_API_BASE_ENDPOINT : ${{ vars.SYPHT_API_BASE_ENDPOINT }}
34+ SYPHT_API_KEY : ${{ secrets.SYPHT_API_KEY }}
35+ SYPHT_AUTH_ENDPOINT : ${{ vars.SYPHT_AUTH_ENDPOINT }}
36+ run : |
37+ pytest -s tests/*.py
Original file line number Diff line number Diff line change 1+ name : Publish Python 🐍 distributions 📦 to PyPI
2+
3+ on : push
4+
5+ jobs :
6+ build-and-publish :
7+ name : Build and publish Python 🐍 distributions 📦 to PyPI
8+ runs-on : ubuntu-latest
9+ environment : deploy
10+ if : startsWith(github.ref, 'refs/tags')
11+ steps :
12+ - uses : actions/checkout@v3
13+ - name : Set up Python
14+ uses : actions/setup-python@v4
15+ with :
16+ python-version : " 3.9"
17+ - name : Install pypa/build
18+ run : >-
19+ python3 -m
20+ pip install
21+ build
22+ --user
23+ - name : Build a binary wheel and a source tarball
24+ run : >-
25+ python3 -m
26+ build
27+ --sdist
28+ --wheel
29+ --outdir dist/
30+ .
31+ - name : Publish distribution 📦 to PyPI
32+ uses : pypa/gh-action-pypi-publish@release/v1
33+ with :
34+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 11from setuptools import find_packages , setup
22
3- __version__ = "0.5.16 "
3+ __version__ = "0.5.17 "
44__pkg_name__ = "sypht"
55
66setup (
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def test_with_wrong_fieldset(self):
3939
4040 def test_data_extraction_1 (self ):
4141 with open ("tests/sample_invoice.pdf" , "rb" ) as f :
42- fid = self .sypht_client .upload (f , ["invoices" ])
42+ fid = self .sypht_client .upload (f , ["invoices:2 " ])
4343 self .assertTrue (validate_uuid4 (fid ))
4444
4545 results = self .sypht_client .fetch_results (fid )
You can’t perform that action at this time.
0 commit comments