Commit 50c947a8 authored by David Reed's avatar David Reed

Add pytest.ini

parent 616bbef0
Pipeline #35276310 passed with stage
in 3 minutes and 12 seconds
......@@ -9,14 +9,12 @@ cache:
- venv/
- node_modules/
before_script:
- python -V
- python -m venv venv
- source venv/bin/activate
- pip install -r requirements.txt -r testing-requirements.txt
test:
script:
before_script:
- python -V
- python -m venv venv
- source venv/bin/activate
- pip install -r requirements.txt -r testing-requirements.txt
- if [ ! -d node_modules/sfdx-cli ]; then
export SFDX_AUTOUPDATE_DISABLE=true;
export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true;
......@@ -25,15 +23,14 @@ test:
node_modules/sfdx-cli/bin/run --version;
node_modules/sfdx-cli/bin/run plugins --core;
fi;
script:
- openssl aes-256-cbc -k $KEY -in assets/server.key.enc -out assets/server.key -d
- node_modules/sfdx-cli/bin/run force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile assets/server.key --username $USERNAME --setdefaultdevhubusername -a DevHub
- node_modules/sfdx-cli/bin/run force:org:create -v DevHub -s -f assets/project-scratch-def.json -a scratch
- node_modules/sfdx-cli/bin/run force:data:tree:import -p test_data/Account-Contact-plan.json -u scratch
- export ACCESS_TOKEN=$(node_modules/sfdx-cli/bin/run force:user:display --json | python -c "import json; import sys; print(json.load(sys.stdin)['result']['accessToken'])")
- export INSTANCE_URL=$(node_modules/sfdx-cli/bin/run force:user:display --json | python -c "import json; import sys; print(json.load(sys.stdin)['result']['instanceUrl'])")
- cd amaxa && pytest --junitxml=../test-reports/junit.xml --cov-config ../.coveragerc --cov=amaxa
- cd ..
after-script:
- pytest --junitxml=test-reports/junit.xml --cov-config pytest.ini --cov=amaxa
after_script:
- node_modules/sfdx-cli/bin/run force:org:delete -u scratch -p
- rm assets/server.key
\ No newline at end of file
[run]
[pytest]
norecursedirs = .git _build tmp* node_modules
[coverage:run]
branch = True
omit =
*_test.py
test_*.py
test/*.py
node_modules/*
[report]
[coverage:report]
exclude_lines =
if self.debug:
pragma: no cover
......@@ -14,3 +12,6 @@ exclude_lines =
if __name__ == .__main__.:
pass
ignore_errors = True
omit =
**/test_*.py
**test_*.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment