Skip to content

Instantly share code, notes, and snippets.

@thomaspoignant
Last active December 2, 2020 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomaspoignant/1ce98041dc6041264e9e80f108867e13 to your computer and use it in GitHub Desktop.
Save thomaspoignant/1ce98041dc6041264e9e80f108867e13 to your computer and use it in GitHub Desktop.
language: python
python: "3.8"
stages:
- test
before_install:
- npm i -g aws-cdk@1.76.0 # Install CDK
- pip install -r requirements.txt --use-feature=2020-resolver # Download CDK python depedencies
jobs:
include:
- stage: test
name: "Test"
script:
- pytest --junitxml=junit-report.xml
- stage: test
name: "Lint"
before_script:
- pip install yamllint flake8 flake8-checkstyle
script:
- flake8 $(shell git ls-files '*.py')
- yamllint -f parsable $(shell git ls-files '*.yml' '*.yaml')
- stage: test
name: "Coverage"
before_script:
- pip install coverage
script:
- coverage run --omit "*/virtualenv/*,*/tests/*" -m pytest
- stage: test
script:
- cdk synth -c stage=dev
- stage: test
script:
- cdk synth -c stage=pre
- stage: test
script:
- cdk synth -c stage=pro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment