Skip to content

Commit 68a291e

Browse files
authored
Test Dart petstore client in CircleCI (#5544)
* test dart2 in circle ci (jdk7) * fix tests * update package * fix dart installation
1 parent 728d03b commit 68a291e

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

CI/.drone.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ steps:
1818
image: haskell:8.6.5
1919
commands:
2020
- (cd samples/client/petstore/haskell-http-client/ && stack --install-ghc --no-haddock-deps haddock --fast && stack test --fast)
21+
# below dart tests moved to circle ci
2122
# test Dart 2.x petstore client
22-
- name: dart2x-test
23-
image: google/dart
24-
commands:
25-
- (cd samples/client/petstore/dart-jaguar/openapi && pub get && pub run build_runner build --delete-conflicting-outputs)
26-
- (cd samples/client/petstore/dart-jaguar/flutter_petstore/openapi && pub get && pub run build_runner build --delete-conflicting-outputs)
27-
- (cd samples/client/petstore/dart2/petstore && pub get && pub run test)
23+
#- name: dart2x-test
24+
# image: google/dart
25+
# commands:
26+
# - (cd samples/client/petstore/dart-jaguar/openapi && pub get && pub run build_runner build --delete-conflicting-outputs)
27+
# - (cd samples/client/petstore/dart-jaguar/flutter_petstore/openapi && pub get && pub run build_runner build --delete-conflicting-outputs)
28+
# - (cd samples/client/petstore/dart2/petstore && pub get && pub run test)
2829
# test Java 11 HTTP client
2930
- name: java11-test
3031
image: openjdk:11.0

CI/circle_parallel.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ set -e
99

1010
if [ "$NODE_INDEX" = "1" ]; then
1111
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
12-
#cp CI/pom.xml.circleci pom.xml
1312
java -version
13+
1414
mvn --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
1515
mvn --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
1616

@@ -46,13 +46,23 @@ elif [ "$NODE_INDEX" = "2" ]; then
4646
# install curl
4747
sudo apt-get -y build-dep libcurl4-gnutls-dev
4848
sudo apt-get -y install libcurl4-gnutls-dev
49+
4950
# run integration tests
5051
mvn --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
5152
else
5253
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
5354
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
5455
java -version
55-
#cp CI/pom.xml.circleci.java7 pom.xml
56+
57+
# install dart2
58+
sudo apt-get update
59+
sudo apt-get install apt-transport-https
60+
sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
61+
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
62+
sudo apt-get update
63+
sudo apt-get install dart
64+
export PATH="$PATH:/usr/lib/dart/bin"
65+
5666
mvn --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
5767
fi
5868

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,9 @@
13841384
<module>samples/openapi3/client/petstore/ruby</module>
13851385
<!-- test java-related projects -->
13861386
<!--<module>samples/client/petstore/scala-akka</module>-->
1387+
<module>samples/client/petstore/dart2/petstore</module>
1388+
<module>samples/client/petstore/dart-jaguar/openapi</module>
1389+
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
13871390
<module>samples/client/petstore/scala-httpclient</module>
13881391
<module>samples/client/petstore/scalaz</module>
13891392
<module>samples/client/petstore/java/feign</module>

0 commit comments

Comments
 (0)