Skip to content

Commit

Permalink
Move TypeScript, JavaScript tests to CircleCI (#10510)
Browse files Browse the repository at this point in the history
* move ts, js tests to circleci

* set NODE_ENV

* curl -k

* comment out haskell installation
  • Loading branch information
wing328 authored Oct 2, 2021
1 parent 755359c commit 026dd8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
22 changes: 0 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,11 @@ cache:
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
- $HOME/samples/client/petstore/ruby/vendor/bundle
- $HOME/samples/client/petstore/python/.venv/
- $HOME/samples/openapi3/client/petstore/typescript/tests/default/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/jquery/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/object_params/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/inversify/node_modules
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
- $HOME/samples/client/petstore/typescript-node/npm/typings/
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
- $HOME/samples/client/petstore/typescript-fetch/tests/default/typings
- $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules
- $HOME/samples/client/petstore/typescript-fetch/builds/default/typings
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules
- $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings
- $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
- $HOME/samples/client/petstore/typescript-angular/node_modules
- $HOME/samples/client/petstore/typescript-angular/typings
- $HOME/samples/server/petstore/rust-server/target
- $HOME/perl5
- $HOME/.cargo
- $HOME/.pub-cache
- $HOME/samples/server/petstore/cpp-pistache/pistache
- $HOME/.npm
- $HOME/.rvm/gems/ruby-2.4.1
- $HOME/website/node_modules/
- $HOME/.cache/deno
Expand Down Expand Up @@ -88,11 +71,6 @@ before_install:
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
# required when sudo: required for the Ruby petstore tests
- gem install bundler
- nvm install 12.20.0
- nvm use 12.20.0
- npm install -g typescript
- npm install -g npm
- npm config set registry http://registry.npmjs.org/
# set python 3.6.3 as default
- source ~/virtualenv/python3.6/bin/activate
# -- skip bash test to shorten build time
Expand Down
11 changes: 5 additions & 6 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ NODE_INDEX=${CIRCLE_NODE_INDEX:-0}

set -e

export NODE_ENV=test

function cleanup {
# Show logs of 'petstore.swagger' container to troubleshoot Unit Test failures, if any.
docker logs petstore.swagger # container name specified in circle.yml
Expand All @@ -20,15 +22,12 @@ if [ "$NODE_INDEX" = "1" ]; then

mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error

echo "show ivy2 cache"
ls -l /home/circleci/.ivy2/cache

elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test haskell"
# install haskell
curl -sSL https://get.haskellstack.org/ | sh
stack upgrade
stack --version
#curl -sSLk https://get.haskellstack.org/ | sh
#stack upgrade
#stack --version
# prepare r
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,6 @@
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-axios/builds/with-npm-version</module>
<module>samples/client/petstore/typescript-axios/tests/default</module>
<!-- TODO: move to github action or circleci
<module>samples/client/petstore/crystal</module>-->
<!-- servers -->
Expand Down Expand Up @@ -1222,7 +1220,6 @@
<!-- commented out due to php ^7.3 || ^8.0 not in travis
<module>samples/client/petstore/php/OpenAPIClient-php</module> -->
<!--<module>samples/client/petstore/javascript-apollo</module>-->
<module>samples/client/petstore/javascript-flowtyped</module>
<module>samples/client/petstore/python-legacy</module>
<module>samples/client/petstore/python-asyncio</module>
<module>samples/client/petstore/python-tornado</module>
Expand Down Expand Up @@ -1359,6 +1356,7 @@
<!-- test non-java projects -->
<module>samples/client/petstore/go</module>
<module>samples/openapi3/client/petstore/go</module>
<module>samples/client/petstore/javascript-flowtyped</module>
<module>samples/client/petstore/javascript-es6</module>
<module>samples/client/petstore/javascript-promise-es6</module>
<module>samples/server/petstore/go-api-server</module>
Expand Down Expand Up @@ -1386,6 +1384,8 @@
<module>samples/client/petstore/typescript-fetch/tests/default</module>
<module>samples/client/petstore/typescript-node/npm</module>
<module>samples/client/petstore/typescript-rxjs/builds/with-npm-version</module>
<module>samples/client/petstore/typescript-axios/builds/with-npm-version</module>
<module>samples/client/petstore/typescript-axios/tests/default</module>
</modules>
</profile>
<!-- test with JDK9 in Shippable CI -->
Expand Down

0 comments on commit 026dd8d

Please sign in to comment.