File: .travis.yml

package info (click to toggle)
golang-gocloud 0.20.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,608 kB
  • sloc: sh: 473; xml: 22; sql: 14; makefile: 4
file content (80 lines) | stat: -rw-r--r-- 2,447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
language: go
go_import_path: gocloud.dev

services:
  - docker

before_install:
  - "df -k"
  # The Bash that comes with OS X is ancient.
  # grep is similar: it's not GNU grep, which means commands aren't portable.
  # Homebrew installs grep as ggrep if you don't build from source, so it needs
  # moving so it takes precedence in the PATH.
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      HOMEBREW_NO_AUTO_UPDATE=1 brew install bash grep;
      mv $(brew --prefix)/bin/ggrep $(brew --prefix)/bin/grep;
    fi
  # Install Terraform.
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      TERRAFORM_OS="darwin";
    else
      TERRAFORM_OS="$TRAVIS_OS_NAME";
    fi
  - curl -sLo /tmp/terraform.zip https://releases.hashicorp.com/terraform/0.12.2/terraform_0.12.2_"${TERRAFORM_OS}"_amd64.zip
  - unzip /tmp/terraform.zip -d /tmp
  - mkdir -p ~/bin
  - mv /tmp/terraform ~/bin
  - export PATH="$HOME/bin:$PATH"
  - terraform -version

install:
  # Re-checkout files preserving line feeds. This prevents Windows builds from
  # converting \n to \r\n.
  - "git config --global core.autocrlf input"
  - "git checkout -- ."

script:
  - 'internal/testing/runchecks.sh'

env:
  global:
  - GOPROXY=https://proxy.golang.org
  - GO111MODULE=on

# When updating Go versions:
# In addition to changing the "go:" versions below, edit the version
# test in runchecks.sh.

jobs:
  include:
    - go: "1.13.x"
      os: linux
    - go: "1.14.x"
      os: linux
    - go: "1.14.x"
      os: osx
    - go: "1.14.x"
      os: windows
      # TODO(rvangent): Remove filter_secrets: false once the Travis issue is fixed:
      # https://travis-ci.community/t/current-known-issues-please-read-this-before-posting-a-new-topic/264/10
      filter_secrets: false
    # Deploy to GitHub Pages.
    - stage: website
      os: linux
      install: "curl -fsSL https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.tar.gz | tar zxf - -C \"$HOME\" hugo"
      script: "HUGO_GOOGLEANALYTICS=UA-135118641-1 \"$HOME/hugo\" -s internal/website"
      deploy:
        provider: pages
        fqdn: gocloud.dev
        skip-cleanup: true
        local-dir: internal/website/public
        github-token: $GITHUB_TOKEN  # set in the Settings page of the repo
        keep-history: true
        verbose: true  # temporarily, while verifying
        on:
          branch: master

stages:
  - name: website
    if: branch = master AND type = push
  - test