Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Sep 3, 2023
1 parent aa272fd commit 352eaf2
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/run-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,35 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-18.04, r: '4.1'}
- {os: ubuntu-20.04, r: '4.2'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-10.15, r: 'release'}
- {os: windows-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_LIBS_USER: ${{ github.workspace }}/R

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.5.2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any:ggplot2
any:dplyr
any:tidyr
- name: Run tests
run: |
sink("test.out")
update.packages(lib.loc=Sys.getenv("R_LIBS_USER"))
if (length(find.package("ggplot2",quiet=TRUE)) < 1) install.packages("ggplot2")
if (length(find.package("magrittr",quiet=TRUE)) < 1) install.packages("magrittr")
if (length(find.package("plyr",quiet=TRUE)) < 1) install.packages("plyr")
if (length(find.package("reshape2",quiet=TRUE)) < 1) install.packages("reshape2")
cat("running tutorial codes....")
source("tutorial.R",echo=TRUE)
cat("running munging codes....")
Expand All @@ -56,7 +58,7 @@ jobs:
sink()
shell: Rscript {0}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3.1.2
with:
name: install-test-${{ matrix.config.os }}-${{ matrix.config.r }}
path: ${{ github.workspace }}/test.out

0 comments on commit 352eaf2

Please sign in to comment.