github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/travis/defaults.go (about) 1 // Copyright 2022 Harness, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package travis 16 17 var defaultInstall = map[string]string{ 18 "csharp": "nuget restore solution-name.sln", 19 "clojure": "lein deps", 20 "crystal": "shards install", 21 "dart": "pub get", 22 "elixir": "mix local.rebar --force; mix local.hex --force; mix deps.get", 23 "elm": "npm install", 24 "erlang": "rebar get-deps", 25 "go": "go install", 26 "groovy": "gradle assemble", 27 "haskell": "cabal install --only-dependencies --enable-tests", 28 "java": "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V", 29 "node_js": "npm install", 30 "perl": "cpanm --quiet --installdeps --notest .", 31 "python": "pip install -r requirements.txt", 32 "ruby": "bundle install --jobs=3 --retry=3", 33 "rust": "cargo build --verbose", 34 35 // default to ruby 36 "": "bundle install --jobs=3 --retry=3", 37 } 38 39 var defaultScript = map[string]string{ 40 "c": "./configure && make && make test", 41 "csharp": "msbuild /p:Configuration=Release solution-name.sln", 42 "cpp": "./configure && make && make test", 43 "clojure": "lein test", 44 "crystal": "crystal spec", 45 "d": "dub test --compiler=$DC", 46 "dart": "pub run test", 47 "elixir": "mix test", 48 "elm": "elm-format --validate . && elm-test", 49 "erlang": "rebar compile && rebar skip_deps=true eunit", 50 "go": "go test -v", 51 "groovy": "gradle check", 52 "haskell": "cabal configure --enable-tests && cabal build && cabal test", 53 "java": "mvn test -B", 54 "node_js": "npm test", 55 "matlab": `matlab -batch "results = runtests('IncludeSubfolders',true); assertSuccess(results);"`, 56 "perl": "perl Build.PL && ./Build test", 57 "perl6": "PERL6LIB=lib prove --ext .t --ext .t6 -v -r --exec=perl6 t/", 58 "php": "phpunit", 59 "ruby": "rake", 60 "rust": "cargo build --verbose; cargo test --verbose", 61 62 // default to ruby 63 "": "rake", 64 } 65 66 var defaultImage = map[string]string{ 67 "c": "gcc", 68 "go": "golang", 69 } 70 71 var defaultServiceImage = map[string]string{ 72 "mysql": "mysql", 73 "postgresql": "postgres", 74 "mariadb": "mariadb", 75 "mongodb": "mongo", 76 "couchdb": "couchdb", 77 "rabbitmq": "rabbitmq", 78 "redis": "redis", 79 "memcached": "memcached", 80 "elasticsearch": "elasticsearch", 81 "neo4j": "neo4j", 82 "riak": "basho/riak-kv", 83 "rethinkdb": "rethinkdb", 84 "cassandra": "cassandra", 85 } 86 87 var defaultServicePorts = map[string][]string{ 88 "mysql": {"3306"}, 89 "postgresql": {"5432"}, 90 "mongodb": {"27017"}, 91 "couchdb": {"5984"}, 92 "redis": {"6379"}, 93 "rabbitmq": {"5672"}, 94 "memcached": {"11211"}, 95 "elasticsearch": {"9200"}, 96 "neo4j": {"7687"}, 97 "riak": {"8087", "8098"}, 98 "rethinkdb": {"28015"}, 99 "mariadb": {"3306"}, 100 "cassandra": {"7000"}, 101 } 102 103 var defaultServiceEnvs = map[string]map[string]string{ 104 "postgresql": { 105 "POSTGRES_USER": "postgres", 106 "POSTGRES_PASSWORD": "postgres", 107 }, 108 "mariadb": { 109 "MARIADB_DATABASE": "test", 110 "MARIADB_USER": "root", 111 "MARIADB_ALLOW_EMPTY_ROOT_PASSWORD": "yes", 112 "MYSQL_USER": "root", 113 "MYSQL_ALLOW_EMPTY_PASSWORD": "yes", 114 "MYSQL_DATABASE": "test", 115 }, 116 "mysql": { 117 "MYSQL_USER": "root", 118 "MYSQL_ALLOW_EMPTY_PASSWORD": "yes", 119 "MYSQL_DATABASE": "test", 120 }, 121 "couchdb": { 122 "COUCHDB_USER": "admin", 123 "COUCHDB_PASSWORD": "travis", 124 }, 125 "rabbitmq": { 126 "RABBITMQ_DEFAULT_VHOST": "/", 127 "RABBITMQ_DEFAULT_USER": "guest", 128 "RABBITMQ_DEFAULT_PASS": "guest", 129 }, 130 }