Skip to content

Commit f95c774

Browse files
committed
Update CI
1 parent c0d6b83 commit f95c774

10 files changed

Lines changed: 86 additions & 59 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
^cran-comments\.md$
77
^LICENSE\.md$
88
^design$
9+
^pkgdown$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
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
13
on:
24
push:
35
branches: [main, master]
46
pull_request:
5-
branches: [main, master]
67

7-
name: R-CMD-check
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
811

912
jobs:
1013
R-CMD-check:
1114
runs-on: ${{ matrix.config.os }}
1215

13-
name: ${{ matrix.config.os }} (R ${{ matrix.config.r }})
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
1417

1518
strategy:
1619
fail-fast: false
1720
matrix:
1821
config:
19-
- {os: ubuntu-latest, r: 'release'}
20-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
22+
- {os: macos-latest, r: 'release'}
2123
- {os: windows-latest, r: 'release'}
22-
- {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'}
2327

2428
env:
2529
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
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
13
on:
24
push:
35
branches: [main, master]
46
pull_request:
5-
branches: [main, master]
67

7-
name: lint
8+
name: lint.yaml
9+
10+
permissions: read-all
811

912
jobs:
1013
lint:
1114
runs-on: ubuntu-latest
1215
env:
1316
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
14-
1517
steps:
1618
- uses: actions/checkout@v4
1719

@@ -21,13 +23,11 @@ jobs:
2123

2224
- uses: r-lib/actions/setup-r-dependencies@v2
2325
with:
24-
extra-packages: any::lintr, any::styler
26+
extra-packages: any::lintr, local::.
2527
needs: lint
2628

2729
- name: Lint
2830
run: lintr::lint_package()
2931
shell: Rscript {0}
30-
31-
- name: Style check
32-
run: styler::style_pkg(dry = "fail")
33-
shell: Rscript {0}
32+
env:
33+
LINTR_ERROR_ON_LINT: true

.github/workflows/pkgdown.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
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
13
on:
24
push:
35
branches: [main, master]
6+
pull_request:
47
release:
58
types: [published]
69
workflow_dispatch:
710

8-
name: pkgdown
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
914

1015
jobs:
1116
pkgdown:
1217
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
1319
concurrency:
14-
group: pkgdown-${{ github.event_name }}
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1521
env:
1622
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17-
23+
permissions:
24+
contents: write
1825
steps:
1926
- uses: actions/checkout@v4
2027

@@ -33,9 +40,9 @@ jobs:
3340
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
3441
shell: Rscript {0}
3542

36-
- name: Deploy to GitHub pages
43+
- name: Deploy to GitHub pages 🚀
3744
if: github.event_name != 'pull_request'
38-
uses: JamesIves/github-pages-deploy-action@v4
45+
uses: JamesIves/github-pages-deploy-action@v4.5.0
3946
with:
4047
clean: false
4148
branch: gh-pages

.github/workflows/test-coverage.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
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
13
on:
24
push:
35
branches: [main, master]
46
pull_request:
5-
branches: [main, master]
67

7-
name: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
811

912
jobs:
1013
test-coverage:
@@ -21,22 +24,34 @@ jobs:
2124

2225
- uses: r-lib/actions/setup-r-dependencies@v2
2326
with:
24-
extra-packages: any::covr
27+
extra-packages: any::covr, any::xml2
2528
needs: coverage
2629

2730
- name: Test coverage
2831
run: |
29-
covr::codecov(
32+
cov <- covr::package_coverage(
3033
quiet = FALSE,
3134
clean = FALSE,
32-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3336
)
37+
print(cov)
38+
covr::to_cobertura(cov)
3439
shell: Rscript {0}
3540

41+
- uses: codecov/codecov-action@v5
42+
with:
43+
# Fail if error if not on PR, or if on PR and token is given
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45+
files: ./cobertura.xml
46+
plugins: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
3650
- name: Show testthat output
3751
if: always()
3852
run: |
39-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \;
53+
## --------------------------------------------------------------------
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4055
shell: bash
4156

4257
- name: Upload test results

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
# devtools
1313
/doc/
1414
/Meta/
15+
docs

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LazyData: true
2323
LazyDataCompression: xz
2424
Encoding: UTF-8
2525
Config/testthat/edition: 3
26-
URL: https://github.com/humanpred/cdiscdata
26+
URL: https://github.com/humanpred/cdiscdata, https://humanpred.github.io/cdiscdata/
2727
BugReports: https://github.com/humanpred/cdiscdata/issues
2828
VignetteBuilder: knitr
2929
RoxygenNote: 7.3.3

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# cdiscdata
3+
4+
<!-- badges: start -->
5+
[![R-CMD-check](https://github.com/humanpred/cdiscdata/actions/workflows/R-CMD-check.yaml/badge.svghttps://github.com/humanpred/cdiscdata/actions/workflows/R-CMD-check.yaml/badge.svghttps://github.com/humanpred/cdiscdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/humanpred/cdiscdata/actions/workflows/R-CMD-check.yaml)
6+
[![Codecov test coverage](https://codecov.io/gh/humanpred/cdiscdata/graph/badge.svg)](https://app.codecov.io/gh/humanpred/cdiscdata)
7+
<!-- badges: end -->
8+
9+
`cdiscdata` provides versioned CDISC Controlled Terminology (SDTM, ADaM)
10+
and Define-XML schemas (XSD) and CDISC XSLT stylesheets. Uses a
11+
validity-date design to store all historical CT versions compactly
12+
without redundant row duplication. Intended as a shared data
13+
dependency for pharmaverse-aligned packages.
14+
15+
## Installation
16+
17+
You can install the development version of cdiscdata from [GitHub](https://github.com/) with:
18+
19+
``` r
20+
# install.packages("pak")
21+
pak::pak("humanpred/cdiscdata")
22+
```
23+
24+
## Example
25+
26+
This is a basic example which shows you how to solve a common problem:
27+
28+
``` r
29+
library(cdiscdata)
30+
## basic example code
31+
```

_pkgdown.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,4 @@
11
url: https://humanpred.github.io/cdiscdata/
2-
32
template:
43
bootstrap: 5
54

6-
navbar:
7-
structure:
8-
left: [intro, reference, articles, news]
9-
10-
reference:
11-
- title: "Data catalogue"
12-
contents:
13-
- list_datasets
14-
- cdiscdata_versions
15-
- title: "Version discovery"
16-
contents:
17-
- available_ct_versions
18-
- title: "Data retrieval"
19-
contents:
20-
- get_dataset
21-
- get_ct
22-
- title: "File paths"
23-
contents:
24-
- schema_path
25-
- stylesheet_path
26-
- title: "Datasets"
27-
contents:
28-
- ct_sdtm
29-
- ct_adam
30-
- datasets_catalogue
31-
32-
articles:
33-
- title: "Guides"
34-
navbar: ~
35-
contents:
36-
- cdiscdata
37-
- versioning

0 commit comments

Comments
 (0)