Repository: vmware/govmomi
Pull request #2386 (2021-04-22 07:40:31)

Remove Travis CI
Github Actions replaced Travis CI in govmomi.

Closes: #2349
Signed-off-by: Michael Gasch <mgasch@vmware.com>


Patch:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index fc7006ae..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-# Use the newer Travis-CI build templates based on the
-# Ubuntu Linux distribution "Xenial Xerus" release.
-os:             linux
-dist:           xenial
-
-# Disable sudo for all builds by default. This ensures all jobs use
-# Travis-CI's containerized build environment unless specified otherwise.
-# The container builds have *much* shorter queue times than the VM-based
-# build environment on which the sudo builds depend.
-sudo:           false
-services:       false
-
-# Set the version of Go.
-language:       go
-go:             1.15
-
-# Always set the project's Go import path to ensure that forked
-# builds get cloned to the correct location.
-go_import_path: github.com/vmware/govmomi
-
-# Ensure all the jobs know where the temp directory is.
-env:
-  global: TMPDIR=/tmp
-
-jobs:
-  include:
-
-    # The "lint" stage runs the various linters against the project.
-    - &lint-stage
-      stage:         lint
-      env:           LINTER=govet
-      install:       true
-      script:        make "${LINTER}"
-
-    - <<:            *lint-stage
-      env:           LINTER=goimports
-
-    # The "build" stage verifies the program can be built against the
-    # various GOOS and GOARCH combinations found in the Go releaser
-    # config file, ".goreleaser.yml".
-    - &build-stage
-      stage:         build
-      env:           GOOS=linux GOARCH=amd64
-      install:       true
-      script:        make install
-
-    - <<:            *build-stage
-      env:           GOOS=darwin  GOARCH=amd64
-
-    - <<:            *build-stage
-      env:           GOOS=freebsd GOARCH=amd64
-
-    - <<:            *build-stage
-      env:           GOOS=windows GOARCH=amd64
-
-    # The test stage executes the test target.
-    - stage:         test
-      install:       true
-      script:        make test
-
-    # The deploy stage deploys the build artifacts using goreleaser.
-    #
-    # This stage will only be activated when there is an annotated tag present
-    # or when the text "/ci-deploy" is present in the commit message. However,
-    # the "deploy" phase of the build will still only be executed on non-PR
-    # builds as that restriction is baked into Travis-CI.
-    #
-    # Finally, this stage requires the Travis-CI VM infrastructure in order to
-    # leverage Docker. This will increase the amount of time the jobs sit
-    # in the queue, waiting to be built. However, it's a necessity as Travis-CI
-    # only allows the use of Docker with VM builds.
-    - stage:         deploy
-      if:            tag IS present OR commit_message =~ /\/ci-deploy/
-      sudo:          required
-      services:      docker
-      install:       true
-      script:        make install
-      after_success: docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
-      deploy:
-      - provider:     script
-        skip_cleanup: true
-        script:       curl -sL http://git.io/goreleaser | bash
-      addons:
-        apt:
-          update:     true
-          packages:   xmlstarlet
diff --git a/vcsim/main.go b/vcsim/main.go
index d927e4d8..c8bb854a 100644
--- a/vcsim/main.go
+++ b/vcsim/main.go
@@ -111,7 +111,7 @@ func main() {
 	}
 
 	switch flag.Arg(0) {
-	case "uuidgen": // util-linux not installed on Travis CI
+	case "uuidgen":
 		fmt.Println(uuid.New().String())
 		os.Exit(0)
 	case "version":


Test patch:
diff --git a/govc/test/test_helper.bash b/govc/test/test_helper.bash
index c726b981..3418a6a6 100644
--- a/govc/test/test_helper.bash
+++ b/govc/test/test_helper.bash
@@ -40,10 +40,6 @@ GOVC_TEST_IMG=govc-images/$(basename $GOVC_TEST_IMG_SRC)
 PATH="$GOPATH/bin:$PATH"
 
 require_docker() {
-  if [ "$TRAVIS" = "true" ] ; then
-    skip "TravisCI is docker rate limited"
-  fi
-
   if ! docker version ; then
     skip "docker client not installed"
   fi
diff --git a/simulator/feature_test.go b/simulator/feature_test.go
index 065c70e3..92fb76b7 100644
--- a/simulator/feature_test.go
+++ b/simulator/feature_test.go
@@ -88,10 +88,9 @@ func Example_setVirtualMachineProperties() {
 // Tie a docker container to the lifecycle of a vcsim VM
 func Example_runContainer() {
 	simulator.Test(func(ctx context.Context, c *vim25.Client) {
-		_, err := exec.LookPath("docker")
-		if err != nil || os.Getenv("TRAVIS") == "true" {
+		if _, err := exec.LookPath("docker"); err != nil {
 			fmt.Println("0 diff")
-			return // docker is required; TravisCI is rate limited
+			return
 		}
 
 		finder := find.NewFinder(c)