This is my travis.yml
language: java
sudo: required
jdk:
- oraclejdk8
install: true
script:
- sudo apt-get update && sudo apt-get install oracle-java8-installer
- java -version
after_success:
- ./gradlew test jacocoTestReport coveralls
And this is the travis output:
[...]
:processTestResources
:testClasses
:test
Download https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
Download https://repo1.maven.org/maven2/org/jacoco/org.jacoco.build/0.7.5.201505241946/org.jacoco.build-0.7.5.201505241946.pom
Download https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
I have no idea why and how I can debug this :\ any hints?
Works on my machine.
It turned out it has nothing to do with jacoco. I'm using JavaFX with TestFX and, of course, it needs a frame buffer. It works after enabling xvfb:
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
Related
I asked this question several months ago here but the solution was obviously not helpful because here I am again with the exact same problem. in that link I was told to change my image from node:latest to node:13. this no longer fixes the problem. I have tried every version of node and none work. I have tried using premade images of puppeteer/codeceptjs but that does not work. here's the problem: 4 months ago I coded a bunch of tests. they worked fine so i set them up on gitlab to run automated tests. 2 months ago I had that issue. I went from node:latest to node:13 but as of last week NONE of the tests run. ZERO lines of code were changed between then and now. before any test runs I get the following error:
smoke tests done by user profile
"before each" hook: codeceptjs.before for "user creates a new page and inserts a regular 1":
Failed to launch chrome!
/builds/ameen3/me-cloud-user-tests/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
now I have searched all over the place for solutions to this problem. I opened an issue on codeceptjs' GitHub page but I have no reason to think they will provide any solution (they previously told me to upgrade my puppeteer version but stopped responding when I mentioned I was using the most recent version). I also found this link but it does not work for me because it involves 'sudo' which causes my gitlab pipeline to fail because 'sudo is not a recognized command'. so then there's this page. I have tried all the solutions on that page but with no luck. if the solution even mentions the word 'yarn' my gitlab.ci-yml file is marked as invalid. I even created a package.config file and inputed the same thing as they suggested in the top answer but it didn't work.
I am using the most recent version of puppeteer and the most recent version of codeceptjs. this is the gitlab.ci-yml file that was working up until a week ago
image: node:13
all_tests:
script:
- apt-get update && apt-get install -yq libgconf-2-4
- apt-get update && apt-get install -y wget --no-install-recommends && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont --no-install-recommends && rm -rf /var/lib/apt/lists/* && apt-get purge --auto-remove -y curl && rm -rf /src/*.deb
- npm install
- npm i codeceptjs-puppeteer
- npm i codeceptjs puppeteer
- ln -sf ./node_modules/.bin/codeceptjs /usr/local/bin/codeceptjs
- npm i --save arrify
- ./node_modules/.bin/codeceptjs run --steps
cache:
paths:
- ./node_modules/.bin/codeceptjs
after_script:
- echo "Cleaning up"
- rm -rf "%CACHE_PATH%/%CI_PIPELINE_ID%"
here is the config file which was working until a week ago:
exports.config = {
tests: './tests/test_test.js',
output: './output',
helpers: {
Puppeteer: {
url: "http://localhost",
show: false,
chrome: {
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
}
}
},
include: {
I: './steps_file.js',
login: './pages/login.js',
confluence: './pages/confluence.js',
editor: './pages/editor.js',
},
bootstrap: null,
mocha: {},
name: 'tests'
};
this link (which I have also tried) says to add some stuff to my package.json file. I never created one of these because I never needed one to run tests. now I have created one and following their instructions the tests still fail with this error
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token p in JSON at position 1 while parsing near 'npm install puppeteer...'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in:
so if anyone could link me to or explain to me what is wrong with my .ci-yml file. or how to make a working one. or even how they work it would be great. I'm so tired of dealing this issue and I hate puppeteer/codeceptjs with a passion now. but seriously how do I make this ci-yml file to work because a week ago there were 0 issues and now I'm lucky if a test goes 2 minutes before cancelling.
You could try running npm init -y inside your project folder to create the package.json file.
I am using Travis CI to deploy github pages using latest Hugo version
v0.59.1
however the build fails with the following error.
1.36s$ curl -LO https://github.com/gohugoio/hugo/releases/download/v0.59.1/hugo_0.59.1_Linux-64bit.deb install.2
1.29s$ sudo dpkg -i hugo_0.55.4_Linux-64bit.deb
0.08s$ hugo
Building sites … ERROR 2019/11/11 10:54:14 error: failed to transform
resource: TOCSS: failed to transform "style.scss" (text/x-sass): this
feature is not available in your current Hugo version
Total in 27 ms
Error: Error building site: logged 1 error(s)
The command "hugo" exited with 255.
Below is My .travis.yml
---
install:
- wget -O /tmp/hugo.deb
https://github.com/gohugoio/hugo/releases/download/v0.59.1/hugo_0.59.1_Linux-64bit.deb
- sudo dpkg -i /tmp/hugo.deb
script:
- hugo
deploy:
- provider: script
script: bash deploy.sh
skip_cleanup: true
on:
branch: source
Any suggestions as to how to address this issue? thanks in advance.
For anyone facing similar issue, It worked for me after replacing hugo_extended_0.59.1_Linux-64bit.deb instead of hugo_0.59.1_Linux-64bit.deb
I am trying to run lint and tests separately with tox-travis, but I cannot seem to get the right combo.
Here are the two base files:
tox.ini
[tox]
envlist = py27, py34, py35, py36, lint
[travis]
python =
3.6: py36
3.5: py35
3.4: py34
2.7: py27
[travis:env]
LINT =
yes: py36, lint
[testenv:lint]
....
[testenv]
...
commands =
pip install -U pip
py.test --basetemp={envtmpdir}
travis.yml
language: python
python:
- 3.6, lint
- 3.5
- 3.4
- 2.7
matrix:
include:
- python: 3.6
env:
- LINT=yes
install: pip install -U tox-travis
script: tox
When python={3.6,3.5,3.4,2.7} and LINT is not set only tests are
run. (correct).
When python=3.6 and LINT=yes it runs NEITHER lint
or tests. (incorrect)
Setting
LINT =
yes: lint
When python={3.6,3.5,3.4,2.7} and LINT is not set only tests are
run. (correct).
When python=3.6 and LINT=yes it runs neither
tests or lint. (incorrect)
Setting: 3.6: py36,lint and yes: lint runs lint whenever python=3.6 regardless of LINT value.
What am I doing wrong here?
I want to use Travis-CI with my Grails 3.0.9 app. For this I created a .travis.yml file:
language: groovy
jdk:
- oraclejdk7
before_install:
- curl -s get.sdkman.io | bash
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk install grails 3.0.9
- sdk default grails 3.0.9
script: grails test-app --stacktrace
When the Travis-CI service wants to build my application, it ends up with this error:
$ export GRAILS_HOME=/home/travis/.sdkman/candidates/grails/3.0.9/
$ export PATH=$PATH:$GRAILS_HOME/bin
$ ./gradlew assemble
...
(downloading a lot of gradle dependencies)
...
BUILD SUCCESSFUL
$ grails test-app
/home/travis/build.sh: line 45: grails: command not found
So do I have to install Grails somehow else or is it because of a missing/wrong path variable?
I've found a working .travis.yml here:
language: groovy
jdk:
- oraclejdk7
before_install:
- curl -s http://get.sdkman.io | bash
- echo sdkman_auto_answer=true > ~/.sdkman/etc/config
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
- sdk install grails 3.0.9
script: grails test-app --stacktrace
Update:
Use get.sdkman.io since get.gvmtool.net doesn't work anymore.
How can i answer a question made by the console in travis-ci? I made a script that is downloading gvm but right after it completes i receive something like this:
"Do you want grails 2.1.5 to be set as default? (Y/n):"
Right after this question the build can't go foward, i tried to use expects but i was not very successful, my travis.yml is this:
language: groovy
jdk:
- oraclejdk7
before_install:
rm -rf ~/.gvm
curl -s get.gvmtool.net > ~/install_gvm.sh
chmod 775 ~/install_gvm.sh
~/install_gvm.sh
source "/home/travis/.sdkman/bin/sdkman-init.sh"
sdk install grails 2.1.5
echo "gvm_auto_answer=Y" > ~/.sdkman/bin/config
branches:
only:
- master
script: grails test-app --non-interactive
EDIT Grails wrapper is not working as you can see here
https://travis-ci.org/jpms2/ResS/builds/81761164
I seemed to find a problem like mine that happened with gvm instalation, the solution to this problem was a command like this:
echo "gvm_auto_answer=true" >> ~/.gvm/etc/config
So i tried to use this command and had no success:
echo "gvm_auto_answer=Y" >> ~/.sdkman/etc/config
I did find a way to pass the log message, using
echo sdkman_auto_answer=true > ~/.sdkman/etc/config
my travis.yml file is like this now:
language: groovy
jdk:
- oraclejdk7
before_install:
rm -rf ~/.gvm
curl -s get.gvmtool.net > ~/install_gvm.sh
chmod 775 ~/install_gvm.sh
~/install_gvm.sh
echo sdkman_auto_answer=true > ~/.sdkman/etc/config
source "/home/travis/.sdkman/bin/sdkman-init.sh"
sdk install grails 2.1.5
branches:
only:
- master
script: grails test-app --non-interactive