Allow nonzero return codes in Travis CI.yml

I am trying to configure Travis CI to create a latex report. When creating a latex report, you need to repeat several steps, and therefore, the first call has a non-zero return code.

My travis.yml so far

language: R

before_install:
  - tlmgr install index

script:
    - latex report
    - bibtex report
    - latex report
    - latex report
    - dvipdf report.dvi report.pdf

However, Travis Docs states

If the script returns a non-zero exit code, the assembly failed, but continues to run until it is flagged as a failure.

So, if my first command latex reporthas a non-zero return code, this will lead to a build failure.

I would really like the assembly to fail if the last one is completed latex reportor dvipdf report.

Does anyone have any ideas or help?

Thanks in advance.

+9
2

, .

, latexmk. bibtex , .

Travis:

https://github.com/73VW/TechnicalReport/blob/master/.travis.yml

, apt-.

: latexmk -pdf -xelatex [Your_latex_file]

+1

|| true .

() :

- (docker run --rm -v $(pwd)/example:/workdir stocker-alert || true) 2>&1 | tee >(cat) | grep 'Price change within 1 day'
  • docker & lt; 0 ( ),
  • 2>&1 - stderr stdin ( grep)
  • tee - ( ) grep
  • , grep , . , grep > 0, .
    grep, ||true grep.

schnatterer/stock-alert.

+1

Source: https://habr.com/ru/post/1629131/


All Articles