mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
Move some travis tests to github workflow, remove redundant c# test (#13704)
* move some travis tests to github workflow, remove reduntant c# test * setup ruby * switch to setup-ruby * bundle install * remove bash * remove bundle install * remmvoe gemfile * add more folders in tab detection * comment out java folder in tab detection * undo changes in tab detection
This commit is contained in:
parent
f11cb7f17d
commit
866d67a78f
32
.github/workflows/misc-test.yaml
vendored
Normal file
32
.github/workflows/misc-test.yaml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Misc Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- '[5-9]+.[0-9]+.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Misc tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.6'
|
||||
bundler-cache: false # runs 'bundle install' and caches installed gems automatically
|
||||
- name: Detect tabs
|
||||
run: /bin/bash ./bin/utils/detect_tab_in_templates.sh
|
||||
- name: Detect changes in test files
|
||||
run: ./bin/utils/detect_test_file_changes.rb bin/utils/test_file_list.yaml
|
||||
- name: Detect carriage return
|
||||
run: /bin/bash ./bin/utils/detect_carriage_return.sh
|
||||
- name: Detect merge conflicts
|
||||
run: /bin/bash ./bin/utils/detect_merge_conflict.sh
|
||||
- name: Detect tabs
|
||||
run: /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
10
.travis.yml
10
.travis.yml
@ -147,16 +147,6 @@ script:
|
||||
- set -e
|
||||
# show docker buildx version
|
||||
- docker buildx version
|
||||
# fail if the template files contains tabs
|
||||
- /bin/bash ./bin/utils/detect_tab_in_templates.sh
|
||||
# fail if the test files have changes
|
||||
- bin/utils/detect_test_file_changes.rb bin/utils/test_file_list.yaml
|
||||
# fail if templates/generators contain carriage return '\r'
|
||||
- /bin/bash ./bin/utils/detect_carriage_return.sh
|
||||
# fail if generators contain merge conflicts
|
||||
- /bin/bash ./bin/utils/detect_merge_conflict.sh
|
||||
# fail if generators contain tab '\t'
|
||||
- /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 -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
|
@ -6,11 +6,11 @@
|
||||
## declare an array of folders
|
||||
declare -a samples=("modules/openapi-generator/src/main/resources/kotlin-server"
|
||||
"modules/openapi-generator/src/main/resources/kotlin-spring"
|
||||
"modules/openapi-generator/src/main/resources/dart-dio"
|
||||
"modules/openapi-generator/src/main/resources/dart"
|
||||
"modules/openapi-generator/src/main/resources/dart2"
|
||||
"modules/openapi-generator/src/main/resources/aspnetcore"
|
||||
"modules/openapi-generator/src/main/resources/powershell"
|
||||
"modules/openapi-generator/src/main/resources/r"
|
||||
)
|
||||
|
||||
## now loop through the above array
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
# csharp-netcore test files and image for upload
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs"
|
||||
sha256: 64024927bc08a520ff11ba7083f83be960909a19ef273f63c1eaaef1cc6f34a2
|
||||
sha256: aaa596db60531417994533b0e7962eca21dcaf8fa3aea1e2e3cb8b1b216cb89f
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs"
|
||||
sha256: dae985015ba461297927d544a78267f2def35e07c3f14ca66468fd61e1fd1c26
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png"
|
||||
|
@ -51,9 +51,8 @@ namespace Org.OpenAPITools.Test.Model
|
||||
[Fact]
|
||||
public void CatInstanceTest()
|
||||
{
|
||||
// test to ensure both Cat and Animal (parent) can have "AdditionalProperties", which result in warnings
|
||||
Cat c = JsonConvert.DeserializeObject<Cat>("{\"className\":\"cat\",\"bar\":\"from json bar\"}");
|
||||
Assert.Equal("from json bar", c.AdditionalProperties["bar"]);
|
||||
// TODO uncomment below to test "IsType" Cat
|
||||
//Assert.IsType<Cat>(instance);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user