Skip to content

Commit

Permalink
test: Run CI tests with SCDB v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Mar 5, 2024
1 parent 6ab9748 commit 24ab8e9
Show file tree
Hide file tree
Showing 5 changed files with 880 additions and 0 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/R-CMD-check-v0.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
inputs:
cache_version:
type: string
default: '1'

jobs:
R-CMD-check:
name: "🔎 Check: SCDB v0.3, ${{ matrix.config.os }} (${{ matrix.config.r }})"
runs-on: ${{ matrix.config.os }}-latest

strategy:
fail-fast: false
matrix:
config:
- {os: macos, r: 'release'}
- {os: windows, r: 'release'}
- {os: ubuntu, r: 'release'}
- {os: ubuntu, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
BACKEND: SQLite
BACKEND_DRV: RSQLite::SQLite
BACKEND_ARGS: 'list(dbname = file.path(tempdir(), "SQLite.SQLite"))'

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: ${{ inputs.cache_version }}
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
args: c("--no-manual", "--as-cran", "--no-tests")

R-CMD-check-hard:
runs-on: ubuntu-latest
name: "🔎 Check: SCDB v0.3, ubuntu (release, no dependencies)"

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
BACKEND: SQLite
BACKEND_DRV: RSQLite::SQLite
BACKEND_ARGS: 'list(dbname = file.path(tempdir(), "SQLite.SQLite"))'

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
cache: false
extra-packages: |
any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true


R-CMD-check-devel:
runs-on: ubuntu-latest
name: "🔎 Check: SCDB v0.3, ubuntu (r-devel)"

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
BACKEND: SQLite
BACKEND_DRV: RSQLite::SQLite
BACKEND_ARGS: 'list(dbname = file.path(tempdir(), "SQLite.SQLite"))'

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: ${{ inputs.cache_version }}
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
130 changes: 130 additions & 0 deletions .github/workflows/R-CMD-check-v0.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
inputs:
cache_version:
type: string
default: '0'

jobs:
R-CMD-check:
name: "🔎 Check: SCDB v0.4, ${{ matrix.config.os }} (${{ matrix.config.r }})"
runs-on: ${{ matrix.config.os }}-latest

strategy:
fail-fast: false
matrix:
config:
- {os: macos, r: 'release'}
- {os: windows, r: 'release'}
- {os: ubuntu, r: 'release'}
- {os: ubuntu, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
BACKEND: SQLite
BACKEND_DRV: RSQLite::SQLite
BACKEND_ARGS: 'list(dbname = file.path(tempdir(), "SQLite.SQLite"))'

steps:
- uses: actions/checkout@v4

- name: Set SCDB version to v0.4
run: |
perl -pi -e 's/SCDB \(>= 0.3.0\)/SCDB \(>= 0.4.0\)/g' DESCRIPTION
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: ${{ inputs.cache_version }}
extra-packages: any::rcmdcheck, github::ssi-dk/[email protected]
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
args: c("--no-manual", "--as-cran", "--no-tests")

R-CMD-check-hard:
runs-on: ubuntu-latest
name: "🔎 Check: SCDB v0.4, ubuntu (release, no dependencies)"

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
BACKEND: SQLite
BACKEND_DRV: RSQLite::SQLite
BACKEND_ARGS: 'list(dbname = file.path(tempdir(), "SQLite.SQLite"))'

steps:
- uses: actions/checkout@v4

- name: Set SCDB version to v0.4
run: |
perl -pi -e 's/SCDB \(>= 0.3.0\)/SCDB \(>= 0.4.0\)/g' DESCRIPTION
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
cache: false
extra-packages: |
any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
github::ssi-dk/[email protected]
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true


R-CMD-check-devel:
runs-on: ubuntu-latest
name: "🔎 Check: SCDB v0.4, ubuntu (r-devel)"

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
BACKEND: SQLite
BACKEND_DRV: RSQLite::SQLite
BACKEND_ARGS: 'list(dbname = file.path(tempdir(), "SQLite.SQLite"))'

steps:
- uses: actions/checkout@v4

- name: Set SCDB version to v0.4
run: |
perl -pi -e 's/SCDB \(>= 0.3.0\)/SCDB \(>= 0.4.0\)/g' DESCRIPTION
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: ${{ inputs.cache_version }}
extra-packages: any::rcmdcheck, github::ssi-dk/[email protected]
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
1 change: 1 addition & 0 deletions .github/workflows/all-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
event_name: ${{ github.event_name }}
run_id: ${{ github.run_id }}
main_branches: main
skip: code-coverage

# code-coverage creates data bases for the tests. Here you can specify the schemas you need for the workflow
schemas: test_ds,not_test_ds
Expand Down
Loading

0 comments on commit 24ab8e9

Please sign in to comment.