Skip to content

Instantly share code, notes, and snippets.

@gandroz
Created April 9, 2020 02:19
Show Gist options
  • Save gandroz/7e0414a7b557270d8480298e3775873b to your computer and use it in GitHub Desktop.
Save gandroz/7e0414a7b557270d8480298e3775873b to your computer and use it in GitHub Desktop.
buildspec yaml file
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
pre_build:
commands:
- apt-get install -y python3-venv
- python3.6 -m venv test_venv
- . test_venv/bin/activate
- pip install --upgrade pip
- pip install .
- pip install -r tests/requirements.txt
- rm -rf dspt
- mkdir test-reports
build:
commands:
- pytest
--html=test-reports/report.html
--self-contained-html
-s
-v
--cov=dspt
--cov-report=html:test-reports/coverage
--junitxml=test-reports/junit.xml
--log-file=test-reports/logs.txt
tests
post_build:
commands:
- echo Build completed on `date`
reports:
coverage:
files:
- "coverage/*"
base-directory: 'test-reports'
discard-paths: yes
report:
files:
- 'junit.xml'
- 'report.html'
- 'assets/*'
base-directory: 'test-reports'
discard-paths: yes
file-format: JunitXml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment