legacy #151
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
name: legacy | |
on: | |
schedule: | |
- cron: "0 09 * * 1" | |
workflow_dispatch: | |
jobs: | |
legacy: | |
runs-on: ubuntu-20.04 | |
name: legacy | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: "Checkout workflowr-pkg-tests" | |
uses: actions/checkout@v4 | |
with: | |
path: "workflowr-pkg-tests" | |
- name: "Checkout workflowr" | |
uses: actions/checkout@v4 | |
with: | |
repository: "workflowr/workflowr" | |
path: "workflowr" | |
- name: Install system dependencies | |
run: | | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:cran/libgit2 | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libcurl4-openssl-dev \ | |
libgit2-dev \ | |
libpng-dev \ | |
libsm6 \ | |
libssl-dev \ | |
libxml2-dev \ | |
libxt6 \ | |
netbase \ | |
pandoc \ | |
pandoc-citeproc \ | |
python3 \ | |
python3-matplotlib \ | |
qpdf \ | |
zlib1g-dev | |
- uses: r-lib/actions/setup-r@v2 | |
id: install-r | |
with: | |
r-version: 3.3.3 | |
- name: Restore R package cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.R_LIBS_USER }}/* | |
key: ubuntu-20.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('DESCRIPTION') }} | |
restore-keys: ubuntu-20.04-${{ steps.install-r.outputs.installed-r-version }}-1- | |
- name: Install dependencies | |
run: Rscript scripts/install-legacy-versions.R | |
working-directory: "workflowr-pkg-tests" | |
- name: Session info | |
run: | | |
sessionInfo() | |
installed.packages()[, c("Package", "Version")] | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_CRAN_INCOMING_: false | |
run: | | |
R CMD build . | |
R CMD check --as-cran --no-examples --no-manual *tar.gz | |
working-directory: "workflowr" | |
- name: Show testthat output | |
if: always() | |
run: find workflowr.Rcheck -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash | |
working-directory: "workflowr" | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: legacy-results | |
path: workflowr/workflowr.Rcheck |