diff --git a/.github/workflows/samples-dart-build-test.yaml b/.github/workflows/samples-dart-build-test.yaml new file mode 100644 index 000000000000..8865e93c8ee0 --- /dev/null +++ b/.github/workflows/samples-dart-build-test.yaml @@ -0,0 +1,53 @@ +name: Samples Dart (build, test) + +on: + push: + branches: + paths: + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/** + - samples/openapi3/client/petstore/dart-dio/oneof/** + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/** + - samples/openapi3/client/petstore/dart-dio/binary_response/** + pull_request: + paths: + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/** + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/** + - samples/openapi3/client/petstore/dart-dio/oneof/** + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/** + - samples/openapi3/client/petstore/dart-dio/binary_response/** + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + sdk: ["3.9.0"] + sample: + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/ + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/ + #- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/ + - samples/openapi3/client/petstore/dart-dio/oneof/ + - samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/ + - samples/openapi3/client/petstore/dart-dio/binary_response/ + steps: + - uses: actions/checkout@v4 + + - uses: dart-lang/setup-dart@v1 + with: + sdk: ${{ matrix.sdk }} + + - name: pub get + working-directory: ${{ matrix.sample }} + run: dart pub get + + - name: build_runner build + working-directory: ${{ matrix.sample }} + run: dart run build_runner build + + - name: test + working-directory: ${{ matrix.sample }} + run: dart test diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore index 7484ee590a38..c5b04829c20a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore +++ b/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +# +# +# diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore index 7484ee590a38..daed634bb4b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +#