-
-
Notifications
You must be signed in to change notification settings - Fork 2
135 lines (123 loc) · 3.75 KB
/
Copy pathci.yml
File metadata and controls
135 lines (123 loc) · 3.75 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: ci
on: [push]
jobs:
build_r:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
# build client code
- run: npm i -g yarn
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: |
./.yarn/cache
./.yarn/unplugged
key: ${{ runner.os }}-yarn2-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-v4
- run: yarn install
- run: yarn build
- run: yarn clean:r
- uses: r-lib/actions/setup-r@v1
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: |
webshot
textshaping
devtools
- name: Style / Format
shell: Rscript {0}
run: styler::style_pkg(dry="fail")
- name: Lint
shell: Rscript {0}
run: |
devtools::document()
devtools::load_all()
lintr::lint_package()
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
shell: Rscript {0}
run: |
devtools::document()
devtools::check(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
- name: Test
shell: Rscript {0}
run: devtools::test()
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-results
path: check
- name: Build Package
run: yarn build:r
- name: Prepare Docs
run: |
mkdir -p public/integrations/r
cp ./upsetjs.tar.gz public/integrations/r/
- name: Build Website
run: yarn docs:r
- name: Copy Docs
run: |
mv docs/* public/integrations/r/
- name: Deploy Main
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: upsetjs/actions-gh-pages@sgratzl
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: upsetjs/upsetjs.github.io
publish_branch: main
publish_dir: ./public
enable_jekyll: true
remove_path_spec: 'integrations/r/'
- if: github.ref == 'refs/heads/develop'
# move to next directory
run: |
mv public public2
mkdir -p public
mv public2 public/next
- name: Deploy Develop
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
uses: upsetjs/actions-gh-pages@sgratzl
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: upsetjs/upsetjs.github.io
publish_branch: main
publish_dir: ./public
enable_jekyll: true
remove_path_spec: 'next/integrations/r/'
build_node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
# build client code
- run: npm i -g yarn
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: |
./.yarn/cache
./.yarn/unplugged
key: ${{ runner.os }}-yarn2-v4-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn2-v4
- run: yarn install
- run: yarn build
- run: yarn lint
# - run: yarn test --ci --coverage --maxWorkers=2