Skip to content

Commit

Permalink
do not use matrix and jobs together, but only use jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jun 23, 2020
1 parent 67f96b0 commit 16493ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
6 changes: 0 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ well as the test on examples. The former is basically the unit tests, and the
latter is to make sure your changes does not break my existing examples in the
[knitr-examples](https://github.com/yihui/knitr-examples).

If you want Travis CI to run the tests on your forked repository before
submitting a PR, make sure the [yihui/knitr-examples](https://github.com/yihui/)
repository is also forked and the forked `knitr-examples` has a branch named
same as the testing branch in your forked `knitr`. Otherwise, the tests on
`knitr-examples` will be skipped.

## roxygen2 documentation

If your changes involve the roxygen2 documentation, please run `Rd2roxygen::rab('.')` to generate the Rd files.
Expand Down
26 changes: 10 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,15 @@ latex: false

# environment variables
env:
matrix:
- TARGET=travis
- TARGET=integration DISPLAY=:99.0
- DISPLAY=:99.0 PATH=$HOME/bin:$PATH RGL_USE_NULL=TRUE

# capturing state, early exit if no integration test is needed
before_install:
- export PATH=$HOME/bin:$PATH
- export RGL_USE_NULL=TRUE
- if [ ${TARGET} = integration ]; then
if ! make integration-need; then
echo "NOTE:"" Integration test skipped. To enable, create a branch named ${TRAVIS_BRANCH} in ${TRAVIS_REPO_SLUG}-examples.";
exit 0;
fi;
fi
- "curl -L https://xran.yihui.org/.gitconfig -o ~/.gitconfig"
- Rscript -e 'update.packages(.libPaths()[1], ask = FALSE)'
- Rscript -e "if (!require('xfun')) install.packages('xfun')"
- Rscript -e "xfun::pkg_load2('covr', 'tinytex')"
- Rscript -e "tinytex:::install_prebuilt()"
- rm TinyTeX.tar.gz

addons:
apt:
Expand Down Expand Up @@ -50,13 +40,17 @@ jobs:
include:
- r: oldrel
- r: release
# run tests
# deploy to xran after integration tests
after_success:
- Rscript -e 'covr::codecov()'
- r: release
name: R release (check knitr-examples)
script:
- git clone https://github.com/yihui/knitr-examples.git
- rm knitr-examples/cache -rf
- make ${TARGET}
- make integration
# deploy to xran after integration tests
after_success:
- "[ $TARGET = travis ] && Rscript -e 'covr::codecov()' || true"
- export R_PKG="$(basename $TRAVIS_REPO_SLUG)"
- "[ $TARGET = integration ] && (curl -L https://xran.yihui.org/r-xran | bash)"
- "curl -L https://xran.yihui.org/r-xran | bash"
- r: devel
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ travis: build
cd ..;\
R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --no-manual

integration-need:
git clone https://github.com/${TRAVIS_REPO_SLUG}-examples.git
cd knitr-examples && \
git checkout ${TRAVIS_BRANCH} && \
GIT_PAGER=cat git show HEAD

integration-run:
xvfb-run make deps knit -C knitr-examples

Expand Down

0 comments on commit 16493ec

Please sign in to comment.