Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
set -e

if [[ "$TASK" == "rpkg" ]]; then
R_PACKAGE_DIR=$(pwd)/r-pkg
R CMD INSTALL \
--clean \
${R_PACKAGE_DIR}
$(pwd)/r-pkg
fi

if [[ "$TASK" == "pypkg" ]]; then
PY_PACKAGE_DIR=$(pwd)/py-pkg
pip install ${PY_PACKAGE_DIR}
pip install $(pwd)/py-pkg
fi
1 change: 0 additions & 1 deletion .ci/report_to_covr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -e

if [[ "$TASK" == "rpkg" ]]; then
Rscript -e " \
install.packages('covr'); \
Sys.setenv(NOT_CRAN = 'true'); \
covr::codecov('r-pkg/') \
"
Expand Down
22 changes: 19 additions & 3 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@

# failure is a natural part of life
set -e

# If language: r,
# install these testing packages we need
if [[ "$TASK" == "rpkg" ]];
then
Rscript -e "install.packages(c('assertthat', 'covr', 'data.table', 'futile.logger', 'httr', 'jsonlite', 'knitr', 'lintr', 'purrr', 'rmarkdown', 'stringr', 'testthat', 'uuid'), repos = 'http://cran.rstudio.com')"
cp test-data/* r-pkg/inst/testdata/

# `devscripts` is required for 'checkbashisms' (https://github.com/r-lib/actions/issues/111)
sudo apt-get update
sudo apt-get install \
--no-install-recommends \
-y \
--allow-downgrades \
libcurl4-openssl-dev \
curl \
devscripts \
texinfo \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-fonts-extra \
qpdf \
|| exit -1

Rscript -e "install.packages(c('assertthat', 'covr', 'data.table', 'futile.logger', 'httr', 'jsonlite', 'knitr', 'lintr', 'purrr', 'rmarkdown', 'stringr', 'testthat', 'uuid'), repos = 'https://cran.r-project.org')"
cp test-data/* r-pkg/inst/testdata/
fi
8 changes: 4 additions & 4 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ set -e

if [[ "$TASK" == "rpkg" ]]; then
Rscript .ci/lint_r_code.R $(pwd)
R_PACKAGE_DIR=$(pwd)/r-pkg
R CMD build ${R_PACKAGE_DIR}
R CMD build $(pwd)/r-pkg
export _R_CHECK_CRAN_INCOMING_=false
R CMD check \
--as-cran \
*.tar.gz
fi

if [[ "$TASK" == "pypkg" ]]; then
PY_PACKAGE_DIR=$(pwd)/py-pkg
pip install wheel
pytest \
--verbose \
${PY_PACKAGE_DI}
$(pwd)/py-pkg
fi
105 changes: 105 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Tests

on: [push]

jobs:
test:
name: ${{ matrix.task }} (ES ${{ matrix.es_version }})
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
#---#
# R #
#---#
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cute

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, thank you

- task: rpkg
es_version: 1.0.3
- task: rpkg
es_version: 1.7.6
- task: rpkg
es_version: 2.4.6
- task: rpkg
es_version: 5.6.16
- task: rpkg
es_version: 6.0.1
- task: rpkg
es_version: 7.1.1
- task: rpkg
es_version: 7.2.1
- task: rpkg
es_version: 7.3.2
- task: rpkg
es_version: 7.4.2
- task: rpkg
es_version: 7.5.2
- task: rpkg
es_version: 7.6.2
- task: rpkg
es_version: 7.7.1
- task: rpkg
es_version: 7.8.1
#--------#
# python #
#--------#
- task: pypkg
es_version: 1.0.3
- task: pypkg
es_version: 1.7.6
- task: pypkg
es_version: 2.4.6
- task: pypkg
es_version: 5.6.16
- task: pypkg
es_version: 6.0.1
- task: pypkg
es_version: 7.1.1
- task: pypkg
es_version: 7.2.1
- task: pypkg
es_version: 7.3.2
- task: pypkg
es_version: 7.4.2
- task: pypkg
es_version: 7.5.2
- task: pypkg
es_version: 7.6.2
- task: pypkg
es_version: 7.7.1
- task: pypkg
es_version: 7.8.1
steps:
- name: checkout repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 1
- name: set up R
if: matrix.task == 'rpkg'
uses: r-lib/actions/setup-r@v1
with:
r-version: '4.0.3'
- name: set up python
if: matrix.task == 'pypkg'
uses: conda-incubator/setup-miniconda@v1.7.0
with:
python-version: 3.7
- name: run tests
shell: bash
run: |
export CONDA_DIR=${HOME}/miniconda3
export ES_VERSION=${{ matrix.es_version }}
export PATH=${CONDA_DIR}/bin:${HOME}/.local/bin:$PATH
export TASK="${{ matrix.task }}"
$GITHUB_WORKSPACE/.ci/setup.sh
$GITHUB_WORKSPACE/.ci/install.sh
$GITHUB_WORKSPACE/setup_local.sh ${{ matrix.es_version }}
$GITHUB_WORKSPACE/.ci/test.sh
$GITHUB_WORKSPACE/.ci/report_to_covr.sh
# https://github.community/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 "🎉"
197 changes: 0 additions & 197 deletions .travis.yml

This file was deleted.

Loading