File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 python -m pip install -e .[dev,torch]
3636 - name : Run Tests
3737 run : |
38- pytest --cov --cov-report xml .
38+ pytest -m 'not rsc_test' - -cov --cov-report xml .
3939 - name : Upload coverage
4040 uses : codecov/codecov-action@v2
41+
42+ test-rsconnect :
43+ name : " Test RSConnect"
44+ runs-on : ubuntu-latest
45+ if : ${{ !github.event.pull_request.head.repo.fork }}
46+ steps :
47+ - uses : actions/checkout@v2
48+ - uses : actions/setup-python@v2
49+ with :
50+ python-version : 3.8
51+ - name : Install dependencies
52+ run : |
53+ python -m pip install --upgrade pip
54+ python -m pip install -r requirements/dev.txt
55+ python -m pip install -e .[test]
56+ - name : run RStudio Connect
57+ run : |
58+ docker-compose up --build -d
59+ make dev
60+ env :
61+ RSC_LICENSE : ${{ secrets.RSC_LICENSE }}
62+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
63+
64+ # NOTE: edited to run checks for python package
65+ - name : Run tests
66+ run : |
67+ pytest vetiver -m 'rsc_test'
Original file line number Diff line number Diff line change 2626 @echo " release - package and upload a release"
2727 @echo " dist - package"
2828 @echo " install - install the package to the active Python's site-packages"
29- @echo " develop - install the package in development mode"
29+ @echo " dev - generate RStudio Connect API keys"
30+ @echo " dev-start - start up development RStudio Connect in Docker"
31+ @echo " dev-stop - stop RStudio Connect dev container"
3032
3133clean : clean-build clean-pyc clean-test docs-clean
3234
@@ -95,7 +97,3 @@ dev-stop:
9597
9698$(RSC_API_KEYS ) : dev-start
9799 python script/setup-rsconnect/dump_api_keys.py $@
98-
99- test :
100- pytest
101-
Original file line number Diff line number Diff line change 11[build-system ]
22requires = [" setuptools>=45" , " wheel" ]
33build-backend = " setuptools.build_meta"
4+
5+ [tool .pytest .ini_options ]
6+ testpaths = [" pins" ]
7+ addopts = " --doctest-modules"
8+ doctest_optionflags = " NORMALIZE_WHITESPACE"
9+ markers = [
10+ " rsc_test: tests for rstudio connect" ,
11+ ]
Original file line number Diff line number Diff line change 66RSC_SERVER_URL = "http://localhost:3939"
77RSC_KEYS_FNAME = "vetiver/tests/rsconnect_api_keys.json"
88
9+ pytestmark = pytest .mark .rsc_test # noqa
10+
911def rsc_from_key (name ):
1012 from pins .rsconnect .api import RsConnectApi
1113
You can’t perform that action at this time.
0 commit comments