Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
MergeBack Lunie Bot committed Jun 9, 2020
2 parents a3835b6 + f7581c1 commit 14c250f
Show file tree
Hide file tree
Showing 901 changed files with 22,018 additions and 26,607 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/api_deploy_development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update existing droplet in Digital Ocean

on:
push:
branches:
- 'develop'
paths:
- 'api/**'
env:
WORKING_DIRECTORY: ./api
HASURA_URL: "https://staging-db.lunie.io/v1/graphql"
HASURA_ADMIN_KEY: ${{ secrets.LUNIE_STAGING_DB_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_API_STAGING }}
jobs:
test:
name: Compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Build image
run: docker build -t lunieapi .
working-directory: ${{env.WORKING_DIRECTORY}}
- name: Save file
run: docker save lunieapi | gzip > lunieapi.tgz
working-directory: ${{env.WORKING_DIRECTORY}}
- name: Copy file via scp
uses: appleboy/scp-action@master
with:
source: "api/lunieapi.tgz,api/docker-compose.yml,api/Caddyfile"
strip_components: 1 # remove the api folder
target: "/root/"
host: ${{ secrets.HOST_STAGING }}
username: root
key: ${{ secrets.SSH_KEY_STAGING }}
- name: Install on instance
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_STAGING }}
username: root
key: ${{ secrets.SSH_KEY_STAGING }}
script: |
sudo curl -L \"https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker image prune -a -f
docker load < lunieapi.tgz
docker stack deploy -c docker-compose.yml lunieapi
docker service update --image lunieapi:latest --force lunieapi_lunieapi
envs: HASURA_URL,HASURA_ADMIN_KEY,SENTRY_DSN
52 changes: 52 additions & 0 deletions .github/workflows/api_deploy_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Update existing droplet in Digital Ocean

on:
pull_request:
branches:
- 'master'
paths:
- 'api/CHANGELOG.md'
env:
WORKING_DIRECTORY: ./api
HASURA_URL: "https://production-db.lunie.io/v1/graphql"
HASURA_ADMIN_KEY: ${{ secrets.LUNIE_PRODUCTION_DB_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_API_PRODUCTION }}
jobs:
test:
name: Compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Build image
run: docker build -t lunieapi .
working-directory: ${{env.WORKING_DIRECTORY}}
- name: Save file
run: docker save lunieapi | gzip > lunieapi.tgz
working-directory: ${{env.WORKING_DIRECTORY}}
- name: Copy file via scp
uses: appleboy/scp-action@master
with:
source: "api/lunieapi.tgz,api/docker-compose.yml,api/Caddyfile.prod"
strip_components: 1 # remove the api folder
target: "/root/"
host: ${{ secrets.HOST_PRODUCTION }}
username: root
key: ${{ secrets.SSH_KEY_PRODUCTION }}
- name: Install on instance
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_PRODUCTION }}
username: root
key: ${{ secrets.SSH_KEY_PRODUCTION }}
script: |
sudo curl -L \"https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
mv Caddyfile.prod Caddyfile
docker image prune -a -f
docker load < lunieapi.tgz
docker stack deploy -c docker-compose.yml lunieapi
docker service update --image lunieapi:latest --force lunieapi_lunieapi
envs: HASURA_URL,HASURA_ADMIN_KEY,SENTRY_DSN
23 changes: 23 additions & 0 deletions .github/workflows/api_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to master

on:
push:
branches:
- develop
paths:
- 'api/CHANGELOG.md'

env:
WORKING_DIRECTORY: ./api
jobs:
publish:
name: publish
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- name: publish to master
run: bash ./tasks/publish.sh
working-directory: ${{env.WORKING_DIRECTORY}}
25 changes: 25 additions & 0 deletions .github/workflows/api_releasePR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create a release PR

on:
push:
branches:
- release
paths:
- 'api/**'
env:
WORKING_DIRECTORY: ./api
jobs:
createReleasePR:
name: createReleasePR
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- name: configure release bot
run: git config user.email "[email protected]" && git config user.name "Release Lunie Bot"
working-directory: ${{env.WORKING_DIRECTORY}}
- name: create release PR
run: npx simsala release-candidate --semver patch --pending-path ./changes --owner luniehq --repository lunie --token ${{ secrets.GIT_BOT_TOKEN }} --message "Please manually test before merging this to master"
working-directory: ${{env.WORKING_DIRECTORY}}
44 changes: 44 additions & 0 deletions .github/workflows/api_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: API testing

on:
pull_request:
branches:
- "*"
paths:
- 'api/**'
env:
WORKING_DIRECTORY: ./api
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Test
run: |
yarn test:unit --coverage
bash <(curl -s https://codecov.io/bash)
working-directory: ${{env.WORKING_DIRECTORY}}
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Lint
run: yarn lint
working-directory: ${{env.WORKING_DIRECTORY}}
checkChangelog:
name: checkChangelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- name: Check if changlog was updated
run: npx simsala check --pending-path ./api/changes
44 changes: 44 additions & 0 deletions .github/workflows/app_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish on Netlify
on:
push:
branches:
- "master"
paths:
- 'app/CHANGELOG.md'

env:
WORKING_DIRECTORY: ./app
GOOGLE_ANALYTICS_UID: ${{ secrets.GOOGLE_ANALYTICS_UID_FE }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_APP }}
SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
VUE_APP_GRAPHQL_URL: ${{ secrets.LUNIE_API }}
VUE_APP_INTERCOM_ID: ${{ secrets.INTERCOM_ID_FE }}
jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Build
run: yarn buildsentry
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN_APP }}
working-directory: ${{env.WORKING_DIRECTORY}}
- uses: nwtgck/[email protected]
id: deploy
with:
production-branch: master
publish-dir: './app/dist'
github-token: ${{ secrets.GIT_BOT_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
netlify-config-path: ./app/netlify.toml
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
54 changes: 54 additions & 0 deletions .github/workflows/app_preview_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish on Netlify
on:
pull_request:
branches-ignore:
- "master"
paths:
- 'app/**'

env:
WORKING_DIRECTORY: ./app
VUE_APP_GRAPHQL_URL: ${{ secrets.LUNIE_API }}
jobs:
deploy:
runs-on: ubuntu-latest
outputs:
deploy-url: ${{ steps.deploy.outputs.deploy-url }}

steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Build
run: yarn build
working-directory: ${{env.WORKING_DIRECTORY}}
- uses: nwtgck/[email protected]
id: deploy
with:
publish-dir: './app/dist'
github-token: ${{ secrets.GIT_BOT_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
netlify-config-path: ./app/netlify.toml
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
e2e:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Run E2E tests
run: |
yarn test:e2e:browserstack --fe=${{needs.deploy.outputs.deploy-url}} --api=https://production-api.lunie.io
working-directory: ${{env.WORKING_DIRECTORY}}
env:
PASSWORD: ${{secrets.GAIA_PASSWORD}}
BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
25 changes: 25 additions & 0 deletions .github/workflows/app_releasePR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create a release PR

on:
push:
branches:
- release
paths:
- 'app/**'
env:
WORKING_DIRECTORY: ./app
jobs:
createReleasePR:
name: createReleasePR
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- name: configure release bot
run: git config user.email "[email protected]" && git config user.name "Release Lunie Bot"
working-directory: ${{env.WORKING_DIRECTORY}}
- name: create release PR
run: npx simsala release-candidate --semver patch --pending-path ./changes --owner luniehq --repository lunie --token ${{ secrets.GIT_BOT_TOKEN }} --message "Please manually test before merging this to master"
working-directory: ${{env.WORKING_DIRECTORY}}
44 changes: 44 additions & 0 deletions .github/workflows/app_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: App testing

on:
pull_request:
branches:
- "*"
paths:
- 'app/**'
env:
WORKING_DIRECTORY: ./app
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Test
run: |
yarn test:unit --coverage
bash <(curl -s https://codecov.io/bash)
working-directory: ${{env.WORKING_DIRECTORY}}
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- name: Lint
run: yarn lint
working-directory: ${{env.WORKING_DIRECTORY}}
checkChangelog:
name: checkChangelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
- name: Check if changlog was updated
run: npx simsala check --pending-path ./app/changes
Loading

0 comments on commit 14c250f

Please sign in to comment.