-
Notifications
You must be signed in to change notification settings - Fork 140
88 lines (82 loc) · 2.04 KB
/
main.yml
File metadata and controls
88 lines (82 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: main
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm install
- name: Install remotes
run: install.packages("remotes")
shell: Rscript {0}
- run: npm run build
- name: Run tests
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm run test
build:
runs-on: ubuntu-latest
env:
VSIX_FILE: vscode-R.vsix
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm install
- name: Package extension
run: npx @vscode/vsce package -o $VSIX_FILE
- uses: actions/upload-artifact@v4
with:
name: ${{ env.VSIX_FILE }}
path: ${{ env.VSIX_FILE }}
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install lintr
run: install.packages("lintr")
shell: Rscript {0}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm install
- name: eslint
run: npx eslint src --ext ts
- name: Lint R directory
run: lintr::lint_dir("./R")
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
- name: Lint root directory
run: lintr::lint_package("sess")
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true