代码拉取完成,页面将自动刷新
dist: bionic
sudo: required
language: go
addons:
apt:
packages:
- rpm
- snapd
branches:
only:
- master
- /v\d+\.\d+\.\d+[-\.0-9a-zA-Z]*/
services:
- mysql
- docker
matrix:
fast_finish: true
include:
- go: 1.12.x
env:
global:
- GO111MODULE=on
- BIGFILE_DEFAULT_DB_USER=root
- BIGFILE_DEFAULT_DB_PWD=
- BIGFILE_MODE=dev
- PATH=/snap/bin:$PATH
before_install:
- if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
- if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
- go get -u github.com/mgechev/revive
install:
- if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
- sudo snap install snapcraft --classic
- sudo apt-get install libgraphicsmagick1-dev
go_import_path: github.com/bigfile/bigfile
before_script:
- mysql -e 'CREATE DATABASE IF NOT EXISTS bigfile;'
- go run artisan/bigfile.go --db-pass= migrate:refresh
script:
- diff <(revive ./...) <(printf "")
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
- test -n "$TRAVIS_TAG" && docker login -u=bigfile -p="$DOCKER_PASSWORD"
- test -n "$TRAVIS_TAG" && openssl aes-256-cbc -K $encrypted_27812f9c1870_key -iv $encrypted_27812f9c1870_iv -in snap.login.enc -out snap.login -d
- test -n "$TRAVIS_TAG" && snapcraft login --with snap.login
deploy:
- provider: script
skip_cleanup: true
script: bash .scripts/goreleaser.sh
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
all_branches: true
notifications:
email: false
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。