Skip to content

Commit

Permalink
Merge pull request #1 from OpenAPITools/master
Browse files Browse the repository at this point in the history
Sync with latest openapi master
  • Loading branch information
bflamand authored Nov 30, 2020
2 parents cb4b03f + adcf9ff commit 7b42777
Show file tree
Hide file tree
Showing 5,904 changed files with 262,406 additions and 110,565 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 13 additions & 6 deletions .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
name: Build on JDK ${{ matrix.java }} and ${{ matrix.os }}
name: 'Build: JDK ${{ matrix.java }} (${{ matrix.os }})'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -48,19 +48,26 @@ jobs:
shell: bash
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}

- name: Test gradle
shell: bash
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

- name: Upload Maven build artifact
uses: actions/upload-artifact@v1
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
with:
name: artifact
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar

- name: Test Gradle plugin usage
shell: bash
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

- name: Test Maven plugin integration
if: matrix.java == '8'
shell: bash
run: |
cd modules/openapi-generator-maven-plugin
mvn verify -Pintegration
verify:
name: Verifies integrity of the commit on ${{ matrix.os }}
name: Verify outputs on ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ script:
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
# run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn -e --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
after_success:
# push to maven repo
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
Expand Down
12 changes: 11 additions & 1 deletion CI/.drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ kind: pipeline
name: default

steps:
# test protobuf schema generator
- name: protobuf-schema-test
image: nanoservice/protobuf-go
commands:
- protoc --version
- mkdir /var/tmp/go/
- cd samples/config/petstore/protobuf-schema
- protoc --go_out=/var/tmp/go/ services/*
- protoc --go_out=/var/tmp/go/ models/*
# test aspnetcore 3.x
- name: aspnetcore-test
image: mcr.microsoft.com/dotnet/core/sdk:3.1
Expand All @@ -28,11 +37,12 @@ steps:
- name: java11-test
image: openjdk:11.0
commands:
- ./mvnw -quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- ./mvnw --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- ./mvnw --quiet verify -Psamples.droneio -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test java native client
- ./mvnw clean test -f samples/client/petstore/java/native/pom.xml
- ./mvnw clean test -f samples/client/petstore/java/native-async/pom.xml
- ./mvnw clean test -f samples/openapi3/client/petstore/java/native/pom.xml
# test all generators with fake petstore spec (2.0, 3.0)
- /bin/bash bin/utils/test-fake-petstore-for-all.sh
# generate test scripts
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ To add test cases (optional) covering the change in the code generator, please r
To test the templates, please perform the following:

- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh .
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files g
enerated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec fro
m time to time. If you've questions or concerns, please open a ticket to start a discussion)
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
- Finally, git commit the updated samples files: `git commit -a`
Expand Down
Loading

0 comments on commit 7b42777

Please sign in to comment.