-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (75 loc) · 2.06 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## GITHUB ACTION FOR R PACKAGE
## Build, check, test, code coverage
## Required secrets
## CODECOV_TOKEN
name: r-cmd-check
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
linux:
name: ubuntu
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
r: [4.0,4.4]
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{matrix.r}}
- name: Install linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfreetype6-dev libcurl4-openssl-dev libssl-dev libxml2-dev libnlopt-dev
- name: Check R installation
run: Rscript -e "print('R installation works!')"
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
any::rcmdcheck
any::pkgdepends
any::covr
needs: check
- name: R CMD check
uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"warning"'
check-dir: '"check"'
- name: Code coverage
if: matrix.r == '4.4'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: Rscript -e 'covr::codecov(token="${{ secrets.CODECOV_TOKEN }}",quiet=FALSE)'
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
r: [4.0,4.4]
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{matrix.r}}
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
any::rcmdcheck
any::pkgdepends
any::covr
needs: check
- name: R CMD check
uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"warning"'
check-dir: '"check"'