github.com/elves/elvish@v0.15.0/.cirrus.yml (about)

     1  test_task:
     2    env:
     3      ELVISH_TEST_TIME_SCALE: 20
     4      CODECOV_TOKEN: ENCRYPTED[fcfbb034d9341821345216d5da5de529e582b85a2dde43da484e9827166ce1770d8e1da4ed2f32ddb7f4eb4fba593158]
     5      TEST_FLAG: -race
     6    go_modules_cache:
     7      fingerprint_script: cat go.sum
     8      folder: $GOPATH/pkg/mod
     9    matrix:
    10      - name: Test on Linux
    11        container:
    12          image: golang:latest
    13      - name: Test on Linux (Old Supported Go Version)
    14        container:
    15          image: golang:1.14
    16        env:
    17          # This should have the same coverage as the previous task, so skip it.
    18          SKIP_UPLOAD_COVERAGE: 1
    19      - name: Test on Linux (Gccgo)
    20        container:
    21          image: debian:unstable-slim
    22        setup_script:
    23          - apt-get -y update
    24          - apt-get -y install ca-certificates gccgo-go
    25        env:
    26          # This should have the same coverage as the previous task, so skip it.
    27          SKIP_UPLOAD_COVERAGE: 1
    28          # Gccgo doesn't support race test
    29          TEST_FLAG: ""
    30        # Gccgo is buggy. Allow failures until it could reliably build and test
    31        # Elvish.
    32        allow_failures: true
    33      - name: Test on macOS
    34        osx_instance:
    35          image: catalina-base
    36        setup_script: brew install go
    37        env:
    38          GOPATH: $HOME/go
    39      - name: Test on FreeBSD
    40        freebsd_instance:
    41          image_family: freebsd-12-1
    42        setup_script: pkg install -y go bash
    43        env:
    44          GOPATH: $HOME/go
    45          # For some reason the FreeBSD runner often has problem reaching codecov.
    46          # Skip it to prevent the coverage from fluctuating, and make the FreeBSD
    47          # task faster. There are very few files that are built on FreeBSD but not
    48          # Linux, so losing this part of the data makes very little difference.
    49          SKIP_UPLOAD_COVERAGE: 1
    50    go_version_script: go version
    51    test_script: go test $TEST_FLAG ./...
    52    upload_coverage_script:
    53      - test -z $SKIP_UPLOAD_COVERAGE || exit 0
    54      - go test -coverprofile=cover -coverpkg=./pkg/... ./pkg/...
    55      - curl -s https://codecov.io/bash -o codecov && bash codecov -f cover -t $CODECOV_TOKEN || true
    56  
    57  checkstyle_go_task:
    58    name: Check the style of .go files
    59    container:
    60      image: golang:latest
    61    env:
    62      PATH: $HOME/go/bin:$PATH
    63    setup_script: go get golang.org/x/tools/cmd/goimports
    64    check_script: make checkstyle-go
    65  
    66  checkstyle_md_task:
    67    name: Check the style of .md files
    68    container:
    69      image: node:latest
    70    env:
    71      PATH: $HOME/.npm-packages/bin:$PATH
    72    setup_script: npm install --global prettier@2.0.5
    73    check_script: make checkstyle-md
    74  
    75  deploy_task:
    76    name: Build binaries and deploy to bintray
    77    only_if: $CIRRUS_PR == ""
    78    env:
    79      BINTRAY_TOKEN: ENCRYPTED[1a1820d17a2014de6b1798d379f86aa24bbd8acd5149656a98bfdf33746c78c85fefc8e6e522fedacdf8c4bf92bb25a0]
    80    go_modules_cache:
    81      fingerprint_script: cat go.sum
    82      folder: $GOPATH/pkg/mod
    83    container:
    84      image: theelves/cirrus-builder
    85    go_version_script: go version
    86    deploy_script: ./tools/cirrus-deploy.sh