forked from mh-itucker/oneDoesSnapdrop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
110 lines (98 loc) · 2.67 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
dist: trusty
language: node_js
sudo: false
git:
depth: 5
node_js: lts/*
before_cache:
- cd $TRAVIS_BUILD_DIR
- rm -rf $TRAVIS_BUILD_DIR/node_modules/.bin $TRAVIS_BUILD_DIR/node_modules/@onedoes
cache:
yarn: true
directories:
- $TRAVIS_BUILD_DIR/node_modules
- $TRAVIS_BUILD_DIR/packages/pwa/app/bower_components
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- source ~/.bashrc
before_script:
- '
if [ "$TRAVIS_BRANCH" != "master" ]; then
export SAUCE_ACCESS_KEY=$PR_SAUCE_ACCESS_KEY;
export SAUCE_USERNAME=$PR_SAUCE_USERNAME;
fi;
'
stages:
- Local tests
- name: Remote tests
if: type IN (cron, push, pull_request) AND (fork = false) AND (tag IS blank)
- name: Deploy Backend
if: tag = release-plz
- name: Deploy Front End
if: tag =~ ^v
jobs:
include:
- stage: Local tests
addons:
firefox: latest
before_script:
- echo "--no-sandbox" > ~/.config/chrome-flags.conf
script: xvfb-run sh ./scripts/test-local.sh
- stage: Remote tests
env: BROWSER=iphone
script: sh ./scripts/test-remote.sh
-
env: BROWSER=android
script: sh ./scripts/test-remote.sh
-
env: BROWSER=chrome
script: sh ./scripts/test-remote.sh
-
env: BROWSER=firefox
script: sh ./scripts/test-remote.sh
-
env: BROWSER=edge
script: sh ./scripts/test-remote.sh
- stage: Deploy Backend
before_script:
- '
git remote rm origin &&
git remote add origin https://${GH_USER}:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git &&
git fetch origin master &&
git checkout -qf master &&
git tag -d release-plz &&
git push origin :release-plz &&
git config user.name "Deployment Bot (from Travis CI)" &&
git config user.email "[email protected]"
'
script:
- '
if [ sh ./scripts/test-files-in-latest-commit-match.sh packages/server ]; then
sh ./scripts/deploy-server.sh &&
sh ./scripts/sync.sh;
fi
'
- '
sh ./scripts/release-bump.sh
'
after_success:
- '
git push origin --follow-tags
'
- stage: Deploy Front End
before_script:
- '
git config user.name "Deployment Bot (from Travis CI)" &&
git config user.email "[email protected]"
'
script:
- yarn run build
deploy:
provider: pages
skip_cleanup: true
local_dir: packages/pwa/dist
github-token: $GITHUB_TOKEN
on:
all_branches: true
tags: true