Skip to content

feat(r-dependent-packages): new skip option to skip R package installation #363

feat(r-dependent-packages): new skip option to skip R package installation

feat(r-dependent-packages): new skip option to skip R package installation #363

Workflow file for this run

name: "CI - Test Features"
on:
pull_request:
branches:
- main
paths:
- src/**
- test/**
- "!**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-changes:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
features: ${{ steps.filter.outputs.changes }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
apt-packages: ./**/apt-packages/**
miniforge: ./**/miniforge/**
pandoc: ./**/pandoc/**
quarto-cli: ./**/quarto-cli/**
r-apt: ./**/r-apt/**
r-dependent-packages: ./**/r-dependent-packages/**
r-history: ./**/r-history/**
r-packages: ./**/r-packages/**
r-rig: ./**/r-rig/**
renv-cache: ./**/renv-cache/**
rstudio-server: ./**/rstudio-server/**
test-detects:
needs:
- detect-changes
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
baseImage:
- debian:stable-slim
- ubuntu:focal
- ubuntu:jammy
- mcr.microsoft.com/devcontainers/base:ubuntu
- mcr.microsoft.com/devcontainers/base:debian
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
# rstudio-server is not supported on Debian
if: matrix.features == 'rstudio-server' && matrix.baseImage != 'debian:stable-slim' && matrix.baseImage != 'mcr.microsoft.com/devcontainers/base:debian' || matrix.features != 'rstudio-server'
test-detectes-scenarios:
if: ${{ github.event_name == 'pull_request' }}
needs:
- detect-changes
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for '${{ matrix.features }}' scenarios"
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated --skip-duplicated .
test-all:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features:
- apt-packages
- miniforge
- pandoc
- quarto-cli
- r-apt
- r-dependent-packages
- r-history
- r-packages
- r-rig
- renv-cache
baseImage:
- debian:stable-slim
- ubuntu:focal
- ubuntu:jammy
- mcr.microsoft.com/devcontainers/base:ubuntu
- mcr.microsoft.com/devcontainers/base:debian
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} .
test-all-scenarios:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features:
- apt-packages
- miniforge
- pandoc
- quarto-cli
- r-apt
- r-dependent-packages
- r-history
- r-packages
- r-rig
- renv-cache
- rstudio-server
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Generating tests for '${{ matrix.features }}' scenarios"
run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated .
test-global:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: "Testing global scenarios"
run: devcontainer features test --global-scenarios-only .