Skip to content

Commit

Permalink
Update r_window.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidycliao committed Oct 8, 2023
1 parent f305c92 commit af2e2e4
Showing 1 changed file with 25 additions and 34 deletions.
59 changes: 25 additions & 34 deletions .github/workflows/r_window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,48 +46,39 @@
# shell: Rscript {0}


name: R
name: My CI Workflow

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
on: [push, pull_request]

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
r-version: ['4.0.0', '4.1.0', '4.1.1']

steps:
- uses: actions/checkout@v3
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # 使用您需要的 Python 版本

- name: Install pandoc
run: |
choco install pandoc
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flair
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.r-version }}
- name: Set up R
uses: r-lib/actions/setup-r@v1
with:
r-version: '4.0.5'

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: Install R dependencies
run: |
rem Optional: Install any R dependencies
rem install.packages(c('your', 'packages'))
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck", "reticulate"))
remotes::install_deps(dependencies = TRUE)
reticulate::virtualenv_create('r-reticulate', python = "python3")
shell: Rscript {0}
- name: Run my script
run: |
# 在這裡執行您的腳本或測試命令
- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual --no-multiarch", error_on = "error")
shell: Rscript {0}

0 comments on commit af2e2e4

Please sign in to comment.