forked from loafle/openapi-generator-original
Add R GitHub action file (#12868)
* fix travis, update rbuildignore * add comment
This commit is contained in:
parent
ca4a86ea55
commit
a3269a0569
@ -250,6 +250,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
supportingFiles.add(new SupportingFile("api_client.mustache", File.separator + "R", "api_client.R"));
|
supportingFiles.add(new SupportingFile("api_client.mustache", File.separator + "R", "api_client.R"));
|
||||||
supportingFiles.add(new SupportingFile("NAMESPACE.mustache", "", "NAMESPACE"));
|
supportingFiles.add(new SupportingFile("NAMESPACE.mustache", "", "NAMESPACE"));
|
||||||
supportingFiles.add(new SupportingFile("testthat.mustache", File.separator + "tests", "testthat.R"));
|
supportingFiles.add(new SupportingFile("testthat.mustache", File.separator + "tests", "testthat.R"));
|
||||||
|
supportingFiles.add(new SupportingFile("r-client.mustache", File.separator + ".github" + File.separator + "workflows", "r-client.yaml"));
|
||||||
|
|
||||||
// add lambda for mustache templates to fix license field
|
// add lambda for mustache templates to fix license field
|
||||||
additionalProperties.put("lambdaLicense", new Mustache.Lambda() {
|
additionalProperties.put("lambdaLicense", new Mustache.Lambda() {
|
||||||
|
@ -6,6 +6,7 @@ cache:
|
|||||||
r_packages:
|
r_packages:
|
||||||
- jsonlite
|
- jsonlite
|
||||||
- httr
|
- httr
|
||||||
|
- testthat
|
||||||
# uncomment below to install deps with devtools
|
# uncomment below to install deps with devtools
|
||||||
#install:
|
#install:
|
||||||
#- R -e 'devtools::install_deps(dep = T)'
|
#- R -e 'devtools::install_deps(dep = T)'
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
^\.gitignore$
|
^\.gitignore$
|
||||||
^\.openapi-generator-ignore$
|
^\.openapi-generator-ignore$
|
||||||
^\.travis\.yml$
|
^\.travis\.yml$
|
||||||
|
^\.github$
|
||||||
^\.openapi-generator$
|
^\.openapi-generator$
|
||||||
^docs$
|
^docs$
|
||||||
^git_push\.sh$
|
^git_push\.sh$
|
||||||
|
26
modules/openapi-generator/src/main/resources/r/r-client.mustache
vendored
Normal file
26
modules/openapi-generator/src/main/resources/r/r-client.mustache
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# This file is automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||||
|
#
|
||||||
|
# Based on https://github.com/r-lib/actions/tree/v2/examples
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
|
pull_request:
|
||||||
|
branches: [main, master]
|
||||||
|
|
||||||
|
name: R-CMD-check
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
R-CMD-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
R_KEEP_PKG_SOURCE: yes
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: r-lib/actions/setup-r@v2
|
||||||
|
with:
|
||||||
|
use-public-rspm: true
|
||||||
|
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||||
|
with:
|
||||||
|
extra-packages: any::rcmdcheck
|
||||||
|
needs: check
|
||||||
|
- uses: r-lib/actions/check-r-package@v2
|
@ -11,6 +11,7 @@
|
|||||||
^\.gitignore$
|
^\.gitignore$
|
||||||
^\.openapi-generator-ignore$
|
^\.openapi-generator-ignore$
|
||||||
^\.travis\.yml$
|
^\.travis\.yml$
|
||||||
|
^\.github$
|
||||||
^\.openapi-generator$
|
^\.openapi-generator$
|
||||||
^docs$
|
^docs$
|
||||||
^git_push\.sh$
|
^git_push\.sh$
|
||||||
|
26
samples/client/petstore/R/.github/workflows/r-client.yaml
vendored
Normal file
26
samples/client/petstore/R/.github/workflows/r-client.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# This file is automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||||
|
#
|
||||||
|
# Based on https://github.com/r-lib/actions/tree/v2/examples
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
|
pull_request:
|
||||||
|
branches: [main, master]
|
||||||
|
|
||||||
|
name: R-CMD-check
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
R-CMD-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
R_KEEP_PKG_SOURCE: yes
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: r-lib/actions/setup-r@v2
|
||||||
|
with:
|
||||||
|
use-public-rspm: true
|
||||||
|
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||||
|
with:
|
||||||
|
extra-packages: any::rcmdcheck
|
||||||
|
needs: check
|
||||||
|
- uses: r-lib/actions/check-r-package@v2
|
@ -1,4 +1,5 @@
|
|||||||
.Rbuildignore
|
.Rbuildignore
|
||||||
|
.github/workflows/r-client.yaml
|
||||||
.gitignore
|
.gitignore
|
||||||
.travis.yml
|
.travis.yml
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
@ -6,6 +6,7 @@ cache:
|
|||||||
r_packages:
|
r_packages:
|
||||||
- jsonlite
|
- jsonlite
|
||||||
- httr
|
- httr
|
||||||
|
- testthat
|
||||||
# uncomment below to install deps with devtools
|
# uncomment below to install deps with devtools
|
||||||
#install:
|
#install:
|
||||||
#- R -e 'devtools::install_deps(dep = T)'
|
#- R -e 'devtools::install_deps(dep = T)'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user