forked from TEAMMATES/teammates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
101 lines (94 loc) · 3.2 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
language: java
os: linux
dist: xenial
jdk:
- openjdk8
branches:
only:
- master
- release
notifications:
email: false
before_install:
- |
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md)|(\.txt)|(\.png)|(\.jpg)|(\.gif)|^(LICENSE)|^(docs)'
status_codes=( ${PIPESTATUS[*]} ); git_diff_status=${status_codes[0]}; grep_status=${status_codes[1]}
if [[ $git_diff_status == 0 && $grep_status == 1 && $TRAVIS_PULL_REQUEST != "false" ]]
then
echo "Only doc files or images were updated in PR, not running the CI."
exit
fi
- nvm install 12
install: true
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/executionHistory/
- rm -rf $HOME/.gradle/caches/*/fileContent/
- rm -rf $HOME/.gradle/caches/*/fileHashes/
- rm -rf $HOME/.gradle/caches/*/javaCompile/
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
- rm -rf $HOME/.gradle/caches/*/scripts/
- rm -rf $HOME/.gradle/caches/*/workerMain/
- rm -rf $HOME/.gradle/caches/*/gc.properties
- rm -rf $HOME/.gradle/caches/journal-1/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
jobs:
include:
- stage: "Prepare Dependencies"
name: "Prepare Dependencies"
script:
- ./gradlew downloadDependencies downloadTestDependencies downloadLinters
- stage: "Lint/Test"
name: "Lint"
script:
- ./gradlew createConfigs testClasses
- ./gradlew lint --continue
- npm ci
- npm run lint
- name: "Component Tests"
script:
- ./gradlew createConfigs componentTests
- ./gradlew jacocoReport
- ./gradlew generateTypes
- npm ci
- npm run coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
- name: "E2E Tests - Firefox"
addons:
firefox: "76.0"
services:
- xvfb
before_script:
- cd $HOME
- curl -fsSL -o geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
- tar -xzf geckodriver.tar.gz
- cd $TRAVIS_BUILD_DIR
- mv src/e2e/resources/test.travis.properties src/e2e/resources/test.properties
- ./gradlew createConfigs testClasses generateTypes
- npm ci
- npm run build -- --progress=false --serviceWorker=false
- ./gradlew appengineStart
script:
- ./gradlew e2eTests
- name: "E2E Tests - Chrome"
addons:
chrome: stable
services:
- xvfb
before_script:
- cd $HOME
- LATEST_CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"`
- curl -fsSL -o chromedriver.zip "https://chromedriver.storage.googleapis.com/${LATEST_CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
- unzip chromedriver.zip
- cd $TRAVIS_BUILD_DIR
- mv src/e2e/resources/test.travis-chrome.properties src/e2e/resources/test.properties
- ./gradlew createConfigs testClasses generateTypes
- npm ci
- npm run build -- --progress=false --serviceWorker=false
- ./gradlew appengineStart
script:
- ./gradlew e2eTests