Skip to content

Commit e10d5cc

Browse files
authored
Merge pull request #27 from asgr/copilot/add-github-actions-ci
Add GitHub Actions R-CMD-check CI workflow
2 parents 6c94ad6 + eab87bc commit e10d5cc

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
pull_request:
6+
branches: [main, master]
7+
8+
name: R-CMD-check
9+
10+
jobs:
11+
R-CMD-check:
12+
runs-on: ${{ matrix.config.os }}
13+
14+
permissions:
15+
contents: read
16+
17+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {os: macOS-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'oldrel-1'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
35+
- name: Install X11 on macOS
36+
if: runner.os == 'macOS'
37+
run: |
38+
brew update
39+
brew install --cask xquartz
40+
41+
- uses: r-lib/actions/setup-pandoc@v2
42+
43+
- uses: r-lib/actions/setup-r@v2
44+
with:
45+
r-version: ${{ matrix.config.r }}
46+
http-user-agent: ${{ matrix.config.http-user-agent }}
47+
use-public-rspm: true
48+
49+
- uses: r-lib/actions/setup-r-dependencies@v2
50+
with:
51+
dependencies: '"hard"'
52+
extra-packages: any::rcmdcheck,
53+
github::asgr/ProSpectData@main,
54+
github::asgr/Rwcs@master,
55+
github::asgr/Rfits@master,
56+
github::ICRAR/ProFit@master,
57+
github::asgr/cmaeshpc@master,
58+
github::asgr/Highlander@master,
59+
github::asgr/hyper.fit@master,
60+
github::asgr/ParmOff@main,
61+
any::knitr,
62+
any::rmarkdown
63+
64+
- uses: r-lib/actions/check-r-package@v2
65+
with:
66+
args: 'c("--no-manual", "--as-cran")'
67+
error-on: '"error"'
68+
upload-snapshots: true

0 commit comments

Comments
 (0)