Skip to content

Commit

Permalink
fix R tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Apr 3, 2024
1 parent 79dc308 commit 0e7c00e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ jobs:
target: i686
python-architecture: x86
interpreter: 3.8 3.9 3.10 3.11 3.12
- os: windows
target: aarch64
interpreter: "3.12"
# interpreter: 3.11 3.12
# - os: windows
# target: aarch64
# interpreter: 3.11 3.12
# NOTE: getting error `lld-link: error: could not open 'python311.lib': no such file or directory`
# I don't see how this error can even happen. We have the same workflow as many other working repos,
# and here just windows cant find python. So that's an overall windows config problem, not a problem with this repo.

runs-on: ${{ (matrix.os == 'linux' && 'ubuntu') || matrix.os }}-latest
steps:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ jobs:
- name: Run tests
run: ./scripts/test-python.sh

# test-r:
# name: 📈 Test R
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: r-lib/actions/setup-r@v2
# - run: rustup update
# - name: Run tests
# run: ./scripts/test-r.sh --install
test-r:
name: 📈 Test R
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- run: rustup update
- name: Run tests
run: ./scripts/test-r.sh --install

docs:
name: 📚 Update docs website
Expand Down
14 changes: 8 additions & 6 deletions scripts/test-r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ for arg in "$@"; do
done

if [ "$INSTALL_DEPS" = true ]; then
Rscript -e 'install.packages("usethis")'
Rscript -e 'install.packages("devtools")'
Rscript -e 'install.packages("testthat")'
Rscript -e 'install.packages("rextendr")'
Rscript -e 'install.packages("usethis"); install.packages("devtools"); install.packages("testthat"); install.packages("rextendr"); rextendr::document("./r"); library(testthat); test_dir("r/tests");'
# NOTE: the packages installed in separate Rscript commands are not available in the next command, so we need to install them all in one command
# Rscript -e 'install.packages("usethis")'
# Rscript -e 'install.packages("devtools")'
# Rscript -e 'install.packages("testthat")'
# Rscript -e 'install.packages("rextendr")'
# Rscript -e 'remotes::install_github("extendr/rextendr")'
else
Rscript -e 'rextendr::document("./r"); library(testthat); test_dir("r/tests");'
fi

Rscript -e 'rextendr::document("./r"); library(testthat); test_dir("r/tests");'

0 comments on commit 0e7c00e

Please sign in to comment.