-
-
Save laymonage/d6eba112de17645f194b3fea0ed72255 to your computer and use it in GitHub Desktop.
func & unit test gitlab yml config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- test | |
- deploy | |
UnitTest: | |
image: python:3.6 | |
stage: test | |
before_script: | |
- apt-get update -qq && apt-get install -y -qq chromedriver | |
- pip install -r requirements.txt | |
- python manage.py migrate | |
- python manage.py collectstatic --no-input | |
- python manage.py runserver 8000 & | |
when: on_success | |
script: | |
- coverage run --include='./*' manage.py test | |
- coverage report -m | |
Deployment: | |
image: ruby:2.4 | |
stage: deploy | |
before_script: | |
- gem install dpl | |
- wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh | |
script: | |
- dpl --provider=heroku --app=$HEROKU_APPNAME --api-key=$HEROKU_APIKEY | |
- export HEROKU_API_KEY=$HEROKU_APIKEY | |
- heroku run --app $HEROKU_APPNAME migrate | |
environment: | |
name: production | |
url: $HEROKU_APP_HOST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setUp(self): | |
super(Story6FunctionalTest, self).setUp() | |
chrome_options = webdriver.chrome.options.Options() | |
chrome_options.add_argument('--no-sandbox') | |
chrome_options.add_argument('--headless') | |
self.selenium = webdriver.Chrome(chrome_options=chrome_options) | |
self.selenium.implicitly_wait(25) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment