File tree Expand file tree Collapse file tree 3 files changed +47
-25
lines changed
Expand file tree Collapse file tree 3 files changed +47
-25
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build :
7+
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ python-version : [3.6, 3.7, 3.8]
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Setup Python # Set Python version
16+ uses : actions/setup-python@v2
17+ with :
18+ python-version : ${{ matrix.python-version }}
19+ - name : Install dependencies
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install poetry
23+ pip install pylint
24+ poetry install -v
25+ - name : Run pylint
26+ run : pylint varname.py
27+ - name : Test with pytest
28+ run : poetry run pytest tests/ --junitxml=junit/test-results-${{ matrix.python-version }}.xml
29+ - name : Upload pytest test results
30+ uses : actions/upload-artifact@v2
31+ with :
32+ name : pytest-results-${{ matrix.python-version }}
33+ path : junit/test-results-${{ matrix.python-version }}.xml
34+ # Use always() to always run this step to publish test results when there are test failures
35+ if : ${{ always() }}
36+ - name : Run codacy-coverage-reporter
37+ uses : codacy/codacy-coverage-reporter-action@master
38+ if : matrix.python-version == 3.8
39+ with :
40+ project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
41+ coverage-reports : .coverage.xml
42+ - name : Publish to PyPI
43+ if : success() && matrix.python-version == 3.8 && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
44+ run : poetry publish --build -u ${{ secrets.pypi_user }} -p ${{ secrets.pypi_password }}
45+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ class VarnameRetrievingError(Exception):
2626def _get_frame (caller ):
2727 try :
2828 return sys ._getframe (caller + 1 )
29- except Exception as e :
30- raise VarnameRetrievingError from e
29+ except Exception as exc :
30+ raise VarnameRetrievingError from exc
3131
3232
3333def _get_node (caller ):
You can’t perform that action at this time.
0 commit comments