Skip to content

ci: add Windows check Github Actions workflow #1

ci: add Windows check Github Actions workflow

ci: add Windows check Github Actions workflow #1

Workflow file for this run

name: Windows Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
windows-check:
runs-on: windows-latest
strategy:
matrix:
r-version: ['4.3', '4.4']
steps:
- uses: actions/checkout@v3
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install Rtools
uses: r-lib/actions/setup-rtools@v2
if: runner.os == 'Windows'
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r-version }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r-version }}-
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check package
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- name: Test installation
run: |
install.packages(".", repos = NULL, type = "source")
library(MicrobiomeStat)
shell: Rscript {0}
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-r${{ matrix.r-version }}-results
path: check