c2aeddf9ea
## What changes were proposed in this pull request?
`testthat` 2.0.0 is released and AppVeyor now started to use it instead of 1.0.2. And then, we started to have R tests failed in AppVeyor. See - https://ci.appveyor.com/project/ApacheSoftwareFoundation/spark/build/1967-master
```
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'run_tests' not found
Calls: ::: -> get
```
This seems because we rely on internal `testthat:::run_tests` here:
https://github.com/r-lib/testthat/blob/v1.0.2/R/test-package.R#L62-L75
dc4c351837/R/pkg/tests/run-all.R (L49-L52)
However, seems it was removed out from 2.0.0. I tried few other exposed APIs like `test_dir` but I failed to make a good compatible fix.
Seems we better fix the `testthat` version first to make the build passed.
## How was this patch tested?
Manually tested and AppVeyor tests.
Author: hyukjinkwon <gurwls223@gmail.com>
Closes #20003 from HyukjinKwon/SPARK-22817.
64 lines
2.3 KiB
YAML
64 lines
2.3 KiB
YAML
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership.
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
# (the "License"); you may not use this file except in compliance with
|
|
# the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
version: "{build}-{branch}"
|
|
|
|
shallow_clone: true
|
|
|
|
platform: x64
|
|
configuration: Debug
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
|
|
only_commits:
|
|
files:
|
|
- appveyor.yml
|
|
- dev/appveyor-install-dependencies.ps1
|
|
- R/
|
|
- sql/core/src/main/scala/org/apache/spark/sql/api/r/
|
|
- core/src/main/scala/org/apache/spark/api/r/
|
|
- mllib/src/main/scala/org/apache/spark/ml/r/
|
|
- core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
|
|
- bin/*.cmd
|
|
|
|
cache:
|
|
- C:\Users\appveyor\.m2
|
|
|
|
install:
|
|
# Install maven and dependencies
|
|
- ps: .\dev\appveyor-install-dependencies.ps1
|
|
# Required package for R unit tests
|
|
- cmd: R -e "install.packages(c('knitr', 'rmarkdown', 'devtools', 'e1071', 'survival'), repos='http://cran.us.r-project.org')"
|
|
# Here, we use the fixed version of testthat. For more details, please see SPARK-22817.
|
|
- cmd: R -e "devtools::install_version('testthat', version = '1.0.2', repos='http://cran.us.r-project.org')"
|
|
- cmd: R -e "packageVersion('knitr'); packageVersion('rmarkdown'); packageVersion('testthat'); packageVersion('e1071'); packageVersion('survival')"
|
|
|
|
build_script:
|
|
- cmd: mvn -DskipTests -Psparkr -Phive -Phive-thriftserver package
|
|
|
|
environment:
|
|
NOT_CRAN: true
|
|
|
|
test_script:
|
|
- cmd: .\bin\spark-submit2.cmd --driver-java-options "-Dlog4j.configuration=file:///%CD:\=/%/R/log4j.properties" --conf spark.hadoop.fs.defaultFS="file:///" R\pkg\tests\run-all.R
|
|
|
|
notifications:
|
|
- provider: Email
|
|
on_build_success: false
|
|
on_build_failure: false
|
|
on_build_status_changed: false
|