diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..16761323 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,29 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{js,py}] +charset = utf-8 + +# 4 space indentation +[*.py] +indent_style = space +indent_size = 4 + +# 4 space indentation +[*.yml] +indent_style = space +indent_size = 2 + +# Indentation override for all JS under lib directory +[client/src/**.{js,vue}] +indent_style = space +indent_size = 2 diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index aa28a48d..cd3b24c8 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -5,27 +5,39 @@ # You can specify a custom docker image from Docker Hub as your build environment. image: python:3.6.6 + clone: depth: full -pipelines: - default: - - step: - caches: - - pip - services: - - postgres - script: # Modify the commands below to build your repository. - - pip install pipenv - - export SECRET_KEY=abcd1234 - - export DATABASE_URL=postgres://postgres:postgres@localhost:5432/skillbox - - export DEBUG=True - - export USE_AWS=False - - pipenv install --dev --system - - ./server/run_unittests_coverage.sh - - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master definitions: + step: &testserver + name: testserver + caches: + - pip + services: + - postgres + script: # Modify the commands below to build your repository. + - pip install pipenv + - export SECRET_KEY=abcd1234 + - export DATABASE_URL=postgres://postgres:postgres@localhost:5432/skillbox + - export DEBUG=True + - export USE_AWS=False + - pipenv install --dev --system + - ./server/run_unittests_coverage.sh services: postgres: image: postgres + + +pipelines: + default: + - step: *testserver + + branches: + master: + - step: *testserver + - step: + name: heroku-deploy + script: + - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master