Skip to content

Commit 2a80923

Browse files
authored
Merge pull request #103 from poissonconsulting/f-ci
Standardize CI (tier: unimportant)
2 parents 505dd74 + 2005a6b commit 2a80923

3 files changed

Lines changed: 25 additions & 146 deletions

File tree

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

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,17 @@
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
1+
name: R-CMD-check
32
on:
43
push:
54
branches: [main, master]
65
pull_request:
76
branches: [main, master]
8-
9-
name: R-CMD-check
10-
11-
permissions: read-all
12-
7+
permissions:
8+
contents: read
139
jobs:
1410
R-CMD-check:
15-
runs-on: ${{ matrix.config.os }}
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: windows-latest, r: 'release'}
25-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
26-
- {os: ubuntu-latest, r: 'release'}
27-
- {os: ubuntu-latest, r: 'oldrel-1'}
28-
29-
env:
30-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31-
R_KEEP_PKG_SOURCE: yes
32-
33-
steps:
34-
- uses: actions/checkout@v4
35-
36-
- uses: r-lib/actions/setup-pandoc@v2
37-
38-
- uses: r-lib/actions/setup-r@v2
39-
with:
40-
r-version: ${{ matrix.config.r }}
41-
http-user-agent: ${{ matrix.config.http-user-agent }}
42-
use-public-rspm: true
43-
44-
- uses: r-lib/actions/setup-r-dependencies@v2
45-
with:
46-
extra-packages: any::rcmdcheck
47-
needs: check
48-
49-
- uses: r-lib/actions/check-r-package@v2
50-
with:
51-
upload-snapshots: true
52-
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
11+
uses: poissonconsulting/.github/.github/workflows/R-CMD-check.yaml@v1
12+
with:
13+
tier: unimportant
14+
jags: false
15+
tex: false
16+
private: false
17+
secrets: inherit

.github/workflows/pkgdown.yaml

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
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
1+
name: pkgdown
32
on:
43
push:
54
branches: [main, master]
@@ -8,50 +7,11 @@ on:
87
release:
98
types: [published]
109
workflow_dispatch:
11-
12-
name: pkgdown
13-
14-
permissions: read-all
15-
10+
permissions:
11+
contents: write
1612
jobs:
1713
pkgdown:
18-
runs-on: ubuntu-latest
19-
# Only restrict concurrency for non-PR jobs
20-
concurrency:
21-
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
22-
env:
23-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24-
permissions:
25-
contents: write
26-
steps:
27-
- uses: actions/checkout@v4
28-
29-
- uses: r-lib/actions/setup-pandoc@v2
30-
31-
- uses: r-lib/actions/setup-r@v2
32-
with:
33-
use-public-rspm: true
34-
35-
- uses: r-lib/actions/setup-r-dependencies@v2
36-
with:
37-
extra-packages: any::pkgdown, local::.
38-
needs: website
39-
40-
- name: Build site
41-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
42-
shell: Rscript {0}
43-
44-
- name: Upload site artifact
45-
if: github.event_name == 'pull_request'
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: pkgdown-site
49-
path: docs/
50-
51-
- name: Deploy to GitHub pages 🚀
52-
if: github.event_name != 'pull_request'
53-
uses: JamesIves/github-pages-deploy-action@v4.5.0
54-
with:
55-
clean: false
56-
branch: gh-pages
57-
folder: docs
14+
uses: poissonconsulting/.github/.github/workflows/pkgdown.yaml@v1
15+
with:
16+
private: false
17+
secrets: inherit
Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,15 @@
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
1+
name: test-coverage
32
on:
43
push:
54
branches: [main, master]
65
pull_request:
76
branches: [main, master]
8-
9-
name: test-coverage
10-
11-
permissions: read-all
12-
7+
permissions:
8+
contents: read
139
jobs:
1410
test-coverage:
15-
runs-on: ubuntu-latest
16-
env:
17-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18-
19-
steps:
20-
- uses: actions/checkout@v4
21-
22-
- uses: r-lib/actions/setup-r@v2
23-
with:
24-
use-public-rspm: true
25-
26-
- uses: r-lib/actions/setup-r-dependencies@v2
27-
with:
28-
extra-packages: any::covr, any::xml2
29-
needs: coverage
30-
31-
- name: Test coverage
32-
run: |
33-
cov <- covr::package_coverage(
34-
quiet = FALSE,
35-
clean = FALSE,
36-
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
37-
)
38-
covr::to_cobertura(cov)
39-
shell: Rscript {0}
40-
41-
- uses: codecov/codecov-action@v4
42-
with:
43-
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44-
file: ./cobertura.xml
45-
plugin: noop
46-
disable_search: true
47-
token: ${{ secrets.CODECOV_TOKEN }}
48-
49-
- name: Show testthat output
50-
if: always()
51-
run: |
52-
## --------------------------------------------------------------------
53-
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
54-
shell: bash
55-
56-
- name: Upload test results
57-
if: failure()
58-
uses: actions/upload-artifact@v4
59-
with:
60-
name: coverage-test-failures
61-
path: ${{ runner.temp }}/package
11+
uses: poissonconsulting/.github/.github/workflows/test-coverage.yaml@v1
12+
with:
13+
tex: false
14+
private: false
15+
secrets: inherit

0 commit comments

Comments
 (0)