-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [ci] Move CI to GitHub Actions (fixes #286) * fixing OS * shell env vars * missing quotes * comments * pandoc * pdflatex * fix NOTEs about unrecognized files * weird linux stuff I h8 the tidyverse * better mirror * use test.sh * unnecessary installs * better path * Update .github/workflows/ci.yml * misc changes * errors are bad * add pkgdown * poppin * I h8 LaTeX * revert tinytex * stuff * more stuff * explicit exit * fix return codes * fix pandoc stuff * fix masking * remove commented-out stuff * NOT_CRAN * just test on r-release * just test oon r-release * more cleanup * simpler config * Update CONTRIBUTING.md * remove some installs
- Loading branch information
Showing
14 changed files
with
123 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [[ "${OS_NAME}" == "ubuntu-latest" ]]; then | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
--no-install-recommends \ | ||
-y \ | ||
--allow-downgrades \ | ||
libcurl4-openssl-dev \ | ||
libfribidi-dev \ | ||
libharfbuzz-dev \ | ||
curl \ | ||
|| exit -1 | ||
fi | ||
|
||
Rscript -e " | ||
options(install.packages.check.source = 'no'); | ||
install.packages('remotes', repos = 'https://cran.r-project.org') | ||
remotes::install_deps(dependencies = TRUE) | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} (R ${{ matrix.r-version }}) | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
r-version: 'release' | ||
- os: macos-latest | ||
r-version: 'release' | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
fetch-depth: 1 | ||
- name: set up R | ||
uses: r-lib/actions/setup-r@v1 | ||
with: | ||
r-version: ${{ matrix.r-version }} | ||
- uses: r-lib/actions/setup-pandoc@v1 | ||
- uses: r-lib/actions/setup-tinytex@v1 | ||
- name: set up dependencies | ||
shell: bash | ||
env: | ||
OS_NAME: ${{ matrix.os }} | ||
run: $GITHUB_WORKSPACE/.github/setup.sh | ||
- name: run tests | ||
shell: bash | ||
run: $GITHUB_WORKSPACE/test.sh | ||
- name: upload coverage | ||
if: ${{ matrix.os == 'macos-latest' && matrix.r-version == 'release' }} | ||
shell: Rscript {0} | ||
run: covr::codecov() | ||
# https://github.uint.cloudmunity/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert | ||
all-successful: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- name: Note that all tests succeeded | ||
run: echo "🎉" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ Imports: | |
visNetwork | ||
Suggests: | ||
ggplot2, | ||
pkgdown, | ||
testthat, | ||
webshot, | ||
withr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
#!/bin/bash | ||
|
||
rm *.tar.gz | ||
rm ~/thing.txt | ||
R CMD BUILD . | ||
set -e pipefail | ||
|
||
rm -f *.tar.gz | ||
R CMD build . | ||
|
||
# Work outside of the source directory to avoid false | ||
# positives (i.e. test the tarball in isolation) | ||
mkdir -p ~/pkgnet_test_dir | ||
cp *.tar.gz ~/pkgnet_test_dir | ||
|
||
export _R_CHECK_CRAN_INCOMING_=false | ||
pushd ~/pkgnet_test_dir | ||
R CMD CHECK *.tar.gz --as-cran | ||
cat ~/thing.txt | ||
popd | ||
R CMD check *.tar.gz --as-cran || exit 1 | ||
|
||
LOG_FILE_NAME="pkgnet.Rcheck/00check.log" | ||
|
||
echo "" | ||
echo "----- R CMD check logs -----" | ||
echo "" | ||
cat pkgnet.Rcheck/00check.log | ||
|
||
echo "" | ||
echo "----- test outputs -----" | ||
echo "" | ||
cat pkgnet.Rcheck/tests/testthat.Rout | ||
|
||
if grep -q -R "WARNING" "$LOG_FILE_NAME"; then | ||
echo "WARNINGS have been found by R CMD check!" | ||
exit 1 | ||
fi | ||
|
||
ALLOWED_CHECK_NOTES=0 | ||
NUM_CHECK_NOTES=$( | ||
cat ${LOG_FILE_NAME} \ | ||
| grep -e '^Status: .* NOTE.*' \ | ||
| sed 's/[^0-9]*//g' | ||
) | ||
if [[ ${NUM_CHECK_NOTES} -gt ${ALLOWED_CHECK_NOTES} ]]; then | ||
echo "Found ${NUM_CHECK_NOTES} NOTEs from R CMD check. Only ${ALLOWED_CHECK_NOTES} are allowed" | ||
exit 1 | ||
fi | ||
|
||
popd || exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters