Skip to content

Commit

Permalink
Add travis.yml to template
Browse files Browse the repository at this point in the history
  • Loading branch information
cychiuae committed Nov 13, 2018
1 parent 152e926 commit f442454
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ function makeDotFile(templateName: string, realName: string): DotFile {
export const PythonTemplate = makeTemplate("HelloWorld", [
makeDotFile("_gitignore", ".gitignore"),
makeDotFile("_skyignore", ".skyignore"),
makeDotFile("_travis.yml", ".travis.yml"),
]);
26 changes: 26 additions & 0 deletions templates/HelloWorld/_travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
sudo: required
language: python
python: 3.6
services:
- docker
env:
- TRAVIS_NODE_VERSION="10"
script:
- make run-ci
- make run-tests
before_deploy:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- npm install -g skycli
deploy:
- provider: script
script: env DATABASE_URL="$DEV_DATABASE_URL" APP_SCHEMA="app_helloworld_dev" ENV="dev" SKYCLI_ENV="staging" scripts/deploy.sh
on:
branch: master
- provider: script
script: env DATABASE_URL="$STAGING_DATABASE_URL" APP_SCHEMA="app_helloworld_staging" ENV="staging" SKYCLI_ENV="staging" scripts/deploy.sh
on:
branch: staging
- provider: script
script: env DATABASE_URL="$PRODUCTION_DATABASE_URL" APP_SCHEMA="app_helloworld" ENV="production" SKYCLI_ENV="production" scripts/deploy.sh
on:
branch: production
2 changes: 1 addition & 1 deletion templates/HelloWorld/skygear.dev.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": 1,
"app": "helloworld-dev"
"app": "helloworld_dev"
}
2 changes: 1 addition & 1 deletion templates/HelloWorld/skygear.production.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": 1,
"app": "helloworld-production"
"app": "helloworld"
}
2 changes: 1 addition & 1 deletion templates/HelloWorld/skygear.staging.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": 1,
"app": "helloworld"
"app": "helloworld_staging"
}

0 comments on commit f442454

Please sign in to comment.