Test docker workflow on self-hosted runner #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- 'main' | |
- 'develop' | |
- 'optimization_develop' | |
- 'optimization_main' | |
push: | |
branches: | |
- 'optimization_develop_self-hosted-runner' | |
name: R-CMD-check-docker | |
jobs: | |
R-CMD-check-docker: | |
runs-on: se-ua2-lin28 | |
strategy: | |
fail-fast: false | |
matrix: | |
r_version: ["4.1.3", "4.2.3", "4.3.3"] | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- | |
name: Build docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: false | |
tags: oa:latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
file: docker/Dockerfile_for_tests | |
load: true | |
build-args: R_VERSION=${{matrix.r_version}} | |
- | |
name: Run rcmdcheck | |
run: | | |
echo "rcmdcheck::rcmdcheck(path = '/OA', check_dir = '/check', error_on = 'warning')" | docker run -i -v "$(pwd)/OlinkAnalyze":/OA -v "$(pwd)/check":/check oa:latest | |
- | |
name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docker-r${{ matrix.config.r }}-check-results | |
path: check |