-
Notifications
You must be signed in to change notification settings - Fork 32
72 lines (61 loc) · 1.89 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
name: R
on:
pull_request:
branches:
- "*"
push:
branches:
- "master"
env:
cache-version: "cache-v1"
jobs:
build:
strategy:
max-parallel: 5
matrix:
config:
- { os: ubuntu-latest }
- { os: windows-latest }
- { os: macos-latest }
runs-on: ${{ matrix.config.os }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
id: install-r
with:
bioc-version: release
- name: Get R version
id: R
run: |
R --version > VERSION
echo "version=$(head -1 VERSION | awk '{print $3}')" >> $GITHUB_OUTPUT
shell: bash -l {0}
- name: Get Bioconductor version
id: BIOC
run: |
echo "version=$R_BIOC_VERSION" >> $GITHUB_OUTPUT
shell: bash -l {0}
- uses: r-lib/actions/setup-pandoc@v2
- name: Cache R packages
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/Library
key: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-${{ steps.BIOC.outputs.version}}-r-${{ steps.R.outputs.version}}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ matrix.config.os }}-biocversion-${{ steps.BIOC.outputs.version}}-r-${{ steps.R.outputs.version}}-
- name: Install and check
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
covr
pkgdown
needs: check
- name: Test coverage
if: github.actor == 'zktuong' && matrix.config.os == 'ubuntu-latest'
run: |
Rscript -e 'covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")'
shell: bash -l {0}