forked from davidaarmstrong/asmcjr
-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (73 loc) · 2.31 KB
/
r.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
86
87
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R Package CI for Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
os: [windows-latest]
r-version: ['4.1.1']
steps:
- uses: actions/checkout@v4
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install system dependencies on Windows
run: |
choco install qpdf
choco install pkgconfiglite
choco install make
choco install miktex # Install LaTeX
choco install rtools # Install Rtools if needed
shell: cmd
- name: Update MiKTeX package database
run: |
mpm --update-db
mpm --update
shell: cmd
- name: Install remotes package
run: |
Rscript -e "install.packages('remotes')"
shell: Rscript {0}
- name: Install basicspace from GitHub
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "remotes::install_github('cran/basicspace', force = TRUE)"
shell: Rscript {0}
- name: Set CRAN mirror and install other R package dependencies
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "options(repos = c(CRAN = 'https://cloud.r-project.org/')); install.packages(c('rjags', 'ggplot2', 'knitr'));"
shell: Rscript {0}
- name: Install rcmdcheck package
run: |
Rscript -e "install.packages('rcmdcheck')"
shell: Rscript {0}
- name: Check
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')"
shell: Rscript {0}
- name: Test (optional)
run: |
Rscript -e "devtools::test()"
shell: Rscript {0}
env:
TZ: UTC
_R_CHECK_SYSTEM_CLOCK_: FALSE
NOT_CRAN: true