Skip to content

Commit d3d507d

Browse files
committed
update workflows
1 parent 974b121 commit d3d507d

File tree

2 files changed

+115
-4
lines changed

2 files changed

+115
-4
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
on:
44
push:
55
branches:
6-
- main
76
- master
87
pull_request:
98
branches:
10-
- main
119
- master
1210

1311
name: R-CMD-check
1412

1513
jobs:
1614
R-CMD-check:
15+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
1716
runs-on: ${{ matrix.config.os }}
1817

1918
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
@@ -70,15 +69,28 @@ jobs:
7069
remotes::install_cran("rcmdcheck")
7170
shell: Rscript {0}
7271

72+
- name: Session info
73+
run: |
74+
options(width = 100)
75+
pkgs <- installed.packages()[, "Package"]
76+
sessioninfo::session_info(pkgs, include_base = TRUE)
77+
shell: Rscript {0}
78+
7379
- name: Check
7480
env:
75-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
81+
_R_CHECK_CRAN_INCOMING_: false
82+
_R_CHECK_FORCE_SUGGESTS_: false
7683
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
7784
shell: Rscript {0}
7885

86+
- name: Show testthat output
87+
if: always()
88+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
89+
shell: bash
90+
7991
- name: Upload check results
8092
if: failure()
81-
uses: actions/upload-artifact@main
93+
uses: actions/upload-artifact@master
8294
with:
8395
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
8496
path: check

.github/workflows/codecov.yaml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage-mac:
13+
name: "Mac"
14+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
15+
runs-on: macOS-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: r-lib/actions/setup-r@master
22+
23+
- uses: r-lib/actions/setup-pandoc@master
24+
25+
- name: Query dependencies
26+
run: |
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
shell: Rscript {0}
30+
31+
- name: Cache R packages
32+
uses: actions/cache@v1
33+
with:
34+
path: ${{ env.R_LIBS_USER }}
35+
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
36+
restore-keys: macOS-r-4.0-1-
37+
38+
- name: Install dependencies
39+
run: |
40+
install.packages(c("remotes"))
41+
remotes::install_deps(dependencies = TRUE)
42+
remotes::install_cran("covr")
43+
shell: Rscript {0}
44+
45+
- name: Test coverage
46+
run: covr::codecov()
47+
shell: Rscript {0}
48+
49+
test-coverage-windows:
50+
name: "Windows"
51+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
52+
runs-on: windows-latest
53+
env:
54+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
55+
steps:
56+
- uses: actions/checkout@v2
57+
58+
# - name: Set path for RTools 4.0
59+
# if: runner.os == 'Windows'
60+
# run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
61+
#
62+
# - name: Install mingw32-make and check toolchain path
63+
# if: runner.os == 'Windows'
64+
# run: |
65+
# pacman -Syu mingw-w64-x86_64-make --noconfirm
66+
# g++ --version
67+
# Get-Command g++ | Select-Object -ExpandProperty Definition
68+
# mingw32-make --version
69+
# Get-Command mingw32-make | Select-Object -ExpandProperty Definition
70+
# shell: powershell
71+
72+
- uses: r-lib/actions/setup-r@master
73+
with:
74+
r-version: 'release'
75+
76+
- uses: r-lib/actions/setup-pandoc@master
77+
78+
- name: Query dependencies
79+
run: |
80+
install.packages('remotes')
81+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
82+
shell: Rscript {0}
83+
84+
- name: Install dependencies
85+
run: |
86+
install.packages(c("remotes"))
87+
remotes::install_deps(dependencies = TRUE)
88+
remotes::install_cran("covr")
89+
shell: Rscript {0}
90+
91+
- name: Test coverage
92+
run: covr::codecov()
93+
shell: Rscript {0}
94+
95+
# - name: Test coverage
96+
# run: |
97+
# options(covr.gcov = 'C:/rtools40/mingw64/bin/gcov.exe');
98+
# covr::codecov(type = "all")
99+
# shell: Rscript {0}

0 commit comments

Comments
 (0)