forked from paradoxxxzero/gnome-shell-system-monitor-applet
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
62 lines (50 loc) · 2.09 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
# https://docs.travis-ci.com/user/multi-os/
# https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
dist: focal
language: node_js
node_js: node
#env:
#- MAX_CPU_PERCENT=20 MAX_MEM_PERCENT=5
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get -qq update
- sudo apt-get -qq -y -o Dpkg::Options::="--force-confnew" install docker-ce
install:
- sudo apt-key update
- sudo apt-get -yq update
- sudo apt -yq install xvfb gnome-shell
- npm install -g eslint
before_script:
- "export DISPLAY=:99.0"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- sleep 3 # give xvfb some time to start
- sudo gnome-shell &
- sleep 3 # give gnome-shell some time to start
script:
# Clear initial gnome-shell errors we don't care about.
#- sudo journalctl /usr/bin/gnome-shell
#- sudo journalctl --rotate
#- sudo journalctl --vacuum-time=1s
# Show pre-extension gnome-shell performance.
#- ps -C gnome-shell -o %cpu,%mem,cmd
# Run JSlint check.
- cd $TRAVIS_BUILD_DIR
- ./checkjs.sh
# Install and enable extension.
#- sudo make install
#- gnome-shell-extension-tool [email protected]
# Give extension time to run.
#- sleep 10
# Show post-extension gnome-shell performance.
#- ps -C gnome-shell -o %cpu,%mem,cmd
## Check CPU. On localhost with 2.80GHz x 4 takes ~3%, on Travis ~15%.
#- bash -c '[[ $(bc <<< "$(ps -C gnome-shell -o %cpu|tail -1) < $MAX_CPU_PERCENT") -eq 1 ]]'
## Check memory. On localhost with 32GB of memory, ~0.6%, on Travis ~3%.
#- bash -c '[[ $(bc <<< "$(ps -C gnome-shell -o %mem|tail -1) < $MAX_MEM_PERCENT") -eq 1 ]]'
## Confirm extension hasn't thrown any errors.
#- sudo journalctl /usr/bin/gnome-shell
#- sudo journalctl /usr/bin/gnome-shell|grep "\-\- No entries \-\-"
# Run Docker GUI tests.
- docker --version
- ./test.sh