Skip to content

Commit 701d1f5

Browse files
committed
add r github workflow
1 parent ae5848b commit 701d1f5

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/samples-r.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Samples R clients
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/R/**
7+
pull_request:
8+
paths:
9+
- samples/client/petstore/R/**
10+
jobs:
11+
build:
12+
name: Build R projects
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
sample:
18+
# clients
19+
- samples/client/petstore/R/
20+
services:
21+
petstore-api:
22+
image: swaggerapi/petstore
23+
ports:
24+
- 80:8080
25+
env:
26+
SWAGGER_HOST: http://petstore.swagger.io
27+
SWAGGER_BASE_PATH: /v2
28+
steps:
29+
- uses: actions/checkout@v5
30+
- name: Add hosts to /etc/hosts
31+
run: |
32+
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
33+
- uses: r-lib/actions/setup-r@v2
34+
working-directory: ${{ matrix.sample }}
35+
with:
36+
use-public-rspm: true
37+
38+
- uses: r-lib/actions/setup-r-dependencies@v2
39+
working-directory: ${{ matrix.sample }}
40+
with:
41+
extra-packages: any::rcmdcheck
42+
needs: check
43+
44+
- uses: r-lib/actions/check-r-package@v2
45+
working-directory: ${{ matrix.sample }}
46+
with:
47+
upload-snapshots: true
48+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
49+

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
#docs/*.md
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
24+
#
25+
#

0 commit comments

Comments
 (0)