Skip to content

ci: automatically use the latest tag for install R regression tests #71

ci: automatically use the latest tag for install R regression tests

ci: automatically use the latest tag for install R regression tests #71

Workflow file for this run

name: test for install R from source
on:
pull_request:
branches:
- master
paths:
- .github/workflows/r-build-test.yml
- scripts/install_R_source.sh
- scripts/setup_R.sh
- scripts/bin/**
- build/templates/dockerfiles/r-ver.Dockerfile.txt
- "!**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tag:
- "devel"
- "latest"
platforms:
- linux/amd64
steps:
- uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: test build
run: |
if [ "${{ matrix.tag }} == "latest" ]; then
TAG="$(jq '.r_version[0]' -r build/matrix/latest.json)"
else
TAG="${{ matrix.tag }}"
fi
echo "TAG=${TAG}" >>"$GITHUB_ENV"
docker buildx bake \
-f bakefiles/"${{ env.TAG }}".docker-bake.json \
--set=*.platform="${{ matrix.platforms }}" \
--set=*.cache-from=docker.io/rocker/r-ver:"${{ env.TAG }}" \
--set=*.cache-from=type=gha,scope=r-ver-"${{ env.TAG }}" \
--set=*.cache-to=type=gha,scope=r-ver-"${{ env.TAG }}" \
--set=r-ver.tags=r-ver-test-"${{ env.TAG }}" \
--load \
r-ver
- name: inspect image
run: |
make inspect-image/r-ver-test-"${{ env.TAG }}"
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: tmp
path: tmp
regression-test:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- "latest"
platforms:
- linux/amd64
script:
- install_rstudio.sh
- install_tidyverse.sh
- install_verse.sh
- install_shiny_server.sh
- install_geospatial.sh
steps:
- uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: test build
run: |
if [ "${{ matrix.tag }} == "latest" ]; then
TAG="$(jq '.r_version[0]' -r build/matrix/latest.json)"
else
TAG="${{ matrix.tag }}"
fi
echo "TAG=${TAG}" >>"$GITHUB_ENV"
docker buildx bake \
-f bakefiles/"${{ env.TAG }}".docker-bake.json \
--set=*.platform="${{ matrix.platforms }}" \
--set=*.cache-from=docker.io/rocker/r-ver:"${{ env.TAG }}" \
--set=*.cache-from=type=gha,scope=r-ver-"${{ env.TAG }}" \
--set=*.cache-to=type=gha,scope=r-ver-"${{ env.TAG }}" \
--set=r-ver.tags=r-ver-test-"${{ env.TAG }}" \
--load \
r-ver
- name: test run rocker scripts
run: |
docker run --rm r-ver-test-"${{ env.TAG }}" "/rocker_scripts/${{ matrix.script }}"