mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Currently, we have different commands to run tests spread across different YAML files and comments in Go files. This change consolidates all the different commands, environment variables, and OS limits into 1 file that Travis, GitHub, and engineers can use to run tests.
31 lines
616 B
YAML
31 lines
616 B
YAML
|
|
dist: focal
|
|
|
|
language: go
|
|
go:
|
|
- 1.16.x
|
|
- 1.15.x
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- rpm
|
|
go_import_path: github.com/nats-io/nats-server
|
|
install:
|
|
- make install-tools
|
|
before_script:
|
|
- make lint
|
|
script:
|
|
- set -e
|
|
- if [[ $TRAVIS_TAG ]]; then make test-tag; fi
|
|
- if [[ ! $TRAVIS_TAG ]]; then make test-no-race; fi
|
|
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.15 ]]; then ./scripts/cov.sh TRAVIS; else make test; fi; fi
|
|
- set +e
|
|
|
|
deploy:
|
|
provider: script
|
|
cleanup: true
|
|
script: curl -sL http://git.io/goreleaser | VERSION=v0.160.0 bash
|
|
on:
|
|
tags: true
|
|
condition: $TRAVIS_GO_VERSION =~ 1.16
|