Skip to content

Commit 846b512

Browse files
Create rchk GHA (#6263)
* Create rchk GHA * fix yaml config * Add a name, try 'ls' * plain ls output not shown... * missing checkout step * Ensure we're not UNPROTECT()ing 'x' * Couple shots in the dark... * more redundancy...for now... * separate UNPROTECT()? * incidental: fix test numbering * attempt * Revert "attempt" This reverts commit 51caab5. * a clean a tempt at PROTECT() inside if * Revert "a clean a tempt at PROTECT() inside if" This reverts commit 1784104. * does it not like consecutive UNPROTECT() calls? * PROTECT() more in forder+bmerge * Exclude "results will be incomplete" hits (but always dump output) * -F everything * manual revert faulty merge --------- Co-authored-by: Benjamin Schwendinger <[email protected]>
1 parent 377c202 commit 846b512

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/rchk.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# adapted from a similar check run by {arrow}
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
on:
19+
push:
20+
branches:
21+
- master
22+
pull_request:
23+
24+
name: 'rchk'
25+
26+
jobs:
27+
rchk:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: r-lib/actions/setup-r@v2
32+
with:
33+
r-version: 'devel'
34+
- name: Build
35+
run: |
36+
ls -l | cat
37+
R CMD build --no-build-vignettes .
38+
mkdir packages
39+
mv data.table_*.tar.gz packages
40+
- name: Run rchk
41+
run: |
42+
docker run -v `pwd`/packages:/rchk/packages kalibera/rchk:latest /rchk/packages/data.table_*.tar.gz |& tee rchk.out
43+
- name: Confirm that rchk has no errors
44+
# Suspicious call, [UP], and [PB] are all of the error types currently at
45+
# https://github.com/kalibera/cran-checks/tree/HEAD/rchk/results
46+
# though this might not be exhaustive, there does not appear to be a way to have rchk return an error code
47+
# CRAN also will remove some of the outputs (especially those related to Rcpp and strptime, e.g.
48+
# ERROR: too many states (abstraction error?))
49+
# https://github.com/kalibera/rchk
50+
run: |
51+
cat rchk.out
52+
if [ $(grep -Fc "Suspicious call" rchk.out) -gt 0 ] || [ $(grep -F "[UP]" rchk.out | grep -Fvc "results will be incomplete") -gt 0 ] || [ $(grep -Fc "[PB]" rchk.out) -gt 0 ]; then
53+
echo "Found rchk errors"
54+
exit 1
55+
fi
56+
if: always()
57+
- name: Dump rchk output logs
58+
run: cat rchk.out
59+
if: always()

0 commit comments

Comments
 (0)