Skip to content

Feat: migration

Feat: migration #2

---
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
permissions: read-all
name: R-CMD-check-versions
jobs:
R-CMD-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (R ${{ matrix.config.r }}, ${{ matrix.config.date }})
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
config:
- date: 2023-10-25 # 08mar2024: Next release date for SCE-R
r: 4.3.1
env:
R_KEEP_PKG_SOURCE: yes
POSTGRES_PW: ${{secrets.TEST_POSTGRES_DB_PW}}
GITHUB_PAT: ${{ secrets.ACTION_PAT || secrets.GITHUB_TOKEN }}
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 }}
use-public-rspm: false
- name: Install curl
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install libcurl4-openssl-dev
- name: Install dependencies
run: |
options(
repos = c(CRAN = "https://packagemanager.posit.co/cran/${{ matrix.config.date }}")
)
install.packages(c("attachment", "rcmdcheck", "pak"), Ncpus = parallel::detectCores()-1)
pak::pak_update()
attachment::att_from_description(field = c("Depends", "Imports", "Suggests", "Remotes")) |>
pak::pkg_install()
shell: Rscript {0}
- name: Session info
run: |
sessionInfo()
installed.packages()[,c("Package", "Version")]
shell: Rscript {0}
- name: Start local postgres server with Docker
if: runner.os == 'Linux'
run: |
docker pull postgres
docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 --detach postgres
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
- name: Stop and remove postgres server
if: runner.os == 'Linux'
run: |
docker stop my-postgres
docker remove my-postgres