Skip to content

Commit 49e3626

Browse files
authored
[R] update R github workflow (#22716)
* fix working dir * fix dir * build locally * install devtools * set dir * set dir * set current dir * set current dir * set current dir * set version * show error only * trigger build failure * Revert "trigger build failure" This reverts commit 7d20114. * trigger build failure testing petstore * install local package * install local package * trigger build failure * test petstore localhost * Revert "test petstore localhost" This reverts commit 008d23b. * undo test_petstore.R
1 parent 701d1f5 commit 49e3626

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/samples-r.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,33 @@ jobs:
3131
run: |
3232
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
3333
- uses: r-lib/actions/setup-r@v2
34-
working-directory: ${{ matrix.sample }}
3534
with:
3635
use-public-rspm: true
3736

38-
- uses: r-lib/actions/setup-r-dependencies@v2
37+
- name: Install devtools
38+
run: install.packages("devtools")
39+
shell: Rscript {0}
40+
working-directory: ${{ matrix.sample }}
41+
42+
- name: Build
43+
run: devtools::build()
44+
shell: Rscript {0}
3945
working-directory: ${{ matrix.sample }}
46+
47+
- uses: r-lib/actions/setup-r-dependencies@v2
4048
with:
49+
working-directory: ${{ matrix.sample }}
4150
extra-packages: any::rcmdcheck
4251
needs: check
4352

4453
- uses: r-lib/actions/check-r-package@v2
45-
working-directory: ${{ matrix.sample }}
4654
with:
55+
working-directory: ${{ matrix.sample }}
4756
upload-snapshots: true
4857
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
58+
error-on: '"error"'
4959

60+
- name: Install local package
61+
run: R CMD INSTALL .
62+
shell: bash # Ensure correct shell for command execution
63+
working-directory: ${{ matrix.sample }}

samples/client/petstore/R/.openapi-generator-ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@
2323
#!docs/README.md
2424
#
2525
#
26+
#
27+
#
28+
#

0 commit comments

Comments
 (0)