Skip to content

Commit 19eb9cb

Browse files
committed
up
1 parent 90e9b20 commit 19eb9cb

13 files changed

+422
-2
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
- package-ecosystem: "docker"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

.github/renovate.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"config:base"
4+
]
5+
}

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: R-CMD-check.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
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")'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GitHub Actions workflow for Waystation version 1.5.0.
2+
# Available as the file "sample-workflow.yml" from the software
3+
# repository at https://github.com/caltechlibrary/waystation
4+
5+
name: Archive GitHub Pages
6+
run-name: Archive GitHub Pages in the Wayback Machine
7+
8+
on:
9+
release:
10+
types: [published]
11+
workflow_dispatch:
12+
13+
permissions:
14+
actions: write
15+
checks: write
16+
contents: write
17+
deployments: write
18+
id-token: write
19+
issues: read
20+
discussions: read
21+
packages: write
22+
pages: write
23+
pull-requests: read
24+
repository-projects: read
25+
security-events: read
26+
statuses: read
27+
28+
jobs:
29+
run-waystation:
30+
name: Run Waystation
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: caltechlibrary/waystation@main

.github/workflows/clear-cache.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Clear cache
3+
4+
on:
5+
workflow_dispatch:
6+
7+
permissions:
8+
actions: write
9+
10+
jobs:
11+
clear-cache:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Clear cache
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
console.log("About to clear")
19+
const caches = await github.rest.actions.getActionsCacheList({
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
})
23+
for (const cache of caches.data.actions_caches) {
24+
console.log(cache)
25+
github.rest.actions.deleteActionsCacheById({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
cache_id: cache.id,
29+
})
30+
}
31+
console.log("Clear completed")
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: External Use
3+
4+
on:
5+
push:
6+
branches:
7+
- "main"
8+
- "dev"
9+
pull_request:
10+
branches:
11+
- "main"
12+
- "dev"
13+
workflow_dispatch:
14+
15+
permissions: read-all
16+
17+
jobs:
18+
sapid-test:
19+
name: sapid-${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
strategy:
24+
matrix:
25+
os:
26+
- "ubuntu-latest"
27+
- "macos-latest"
28+
- "windows-latest"
29+
defaults:
30+
run:
31+
shell: bash
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Get number of CPU cores
35+
uses: SimenB/github-actions-cpu-cores@v2
36+
id: cpu-cores
37+
- uses: r-lib/actions/setup-r@v2
38+
with:
39+
use-public-rspm: true
40+
Ncpus: ${{ steps.cpu-cores.outputs.count }}
41+
- name: Install dependencies (Linux)
42+
if: matrix.os == 'ubuntu-latest'
43+
run: |
44+
sudo apt-get update && sudo apt-get install -y --no-install-recommends libcurl4-openssl-dev libfribidi-dev libharfbuzz-dev libnetcdf-dev \
45+
&& sudo apt-get clean \
46+
&& sudo rm -rf /var/lib/apt/lists/*
47+
- name: Install (Linux)
48+
if: matrix.os == 'ubuntu-latest'
49+
run: |
50+
install.packages("sapid", repos = c("https://adafede.r-universe.dev", "https://bioc.r-universe.dev", "https://cloud.r-project.org"), type = "source")
51+
shell: Rscript {0}
52+
- name: Install (MacOS and Windows)
53+
if: matrix.os != 'ubuntu-latest'
54+
run: |
55+
install.packages("sapid", repos = c("https://adafede.r-universe.dev", "https://bioc.r-universe.dev", "https://cloud.r-project.org"), type = "binary")
56+
shell: Rscript {0}
57+
- name: Run pipeline
58+
run: |
59+
sapid:::.packageName
60+
shell: Rscript {0}

.github/workflows/pkgdown.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
permissions:
15+
actions: write
16+
checks: write
17+
contents: write
18+
deployments: write
19+
id-token: write
20+
issues: read
21+
discussions: read
22+
packages: write
23+
pages: write
24+
pull-requests: read
25+
repository-projects: read
26+
security-events: read
27+
statuses: read
28+
29+
jobs:
30+
pkgdown:
31+
runs-on: ubuntu-latest
32+
# Only restrict concurrency for non-PR jobs
33+
concurrency:
34+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
35+
env:
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
37+
permissions:
38+
contents: write
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- uses: r-lib/actions/setup-pandoc@v2
43+
44+
- uses: r-lib/actions/setup-r@v2
45+
with:
46+
use-public-rspm: true
47+
48+
- uses: r-lib/actions/setup-r-dependencies@v2
49+
with:
50+
extra-packages: any::pkgdown, local::.
51+
needs: website
52+
53+
- name: Build site
54+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
55+
shell: Rscript {0}
56+
57+
- name: Deploy to GitHub pages 🚀
58+
if: github.event_name != 'pull_request'
59+
uses: JamesIves/github-pages-deploy-action@v4.7.2
60+
with:
61+
clean: false
62+
branch: gh-pages
63+
folder: docs
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: License Report
3+
4+
permissions: read-all
5+
6+
on:
7+
push:
8+
branches-ignore:
9+
- "main"
10+
pull_request:
11+
branches:
12+
- "main"
13+
14+
jobs:
15+
license-report:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
- name: License Report
21+
uses: insightsengineering/r-license-report@v1
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Remove old artifacts
3+
4+
permissions: read-all
5+
6+
on:
7+
schedule:
8+
# Every day at 1am
9+
- cron: "0 1 * * *"
10+
11+
jobs:
12+
remove-old-artifacts:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
steps:
16+
- name: Remove old artifacts
17+
uses: c-hive/gha-remove-artifacts@v1
18+
with:
19+
age: "1 month" # '<number> <unit>', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js
20+
# Optional inputs
21+
# skip-tags: true
22+
# skip-recent: 5
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
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@v5
42+
with:
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44+
files: ./cobertura.xml
45+
plugins: 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

0 commit comments

Comments
 (0)