badguardhome/.travis.yml

82 lines
1.5 KiB
YAML
Raw Normal View History

2018-08-30 15:16:37 +00:00
language: go
sudo: false
2019-01-29 12:11:11 +00:00
2018-08-30 15:16:37 +00:00
go:
- 1.11.x
- 1.x
os:
- linux
- osx
2019-01-04 18:00:06 +00:00
before_install:
- nvm install node
- npm install -g npm
install:
- npm --prefix client install
2019-01-29 12:11:11 +00:00
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
- $HOME/Library/Caches/go-build
2018-08-30 15:16:37 +00:00
script:
2019-01-04 18:00:06 +00:00
- node -v
- npm -v
2019-01-25 09:55:13 +00:00
# Run tests
- go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
# Make
- make build/static/index.html
- make
2018-08-30 15:16:37 +00:00
2019-01-25 09:55:13 +00:00
after_success:
2019-01-29 12:11:11 +00:00
- bash <(curl -s https://codecov.io/bash)
matrix:
include:
# Release build configuration
- name: release
go:
- 1.11.x
os:
- linux
script:
- node -v
- npm -v
# Run tests just in case
- go test -race -v -bench=. ./...
# Prepare releases
- ./release.sh
- ls -l dist
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- dist/AdGuardHome_*
on:
repo: AdguardTeam/AdGuardHome
tags: true
draft: true
file_glob: true
skip_cleanup: true
- name: docker
if: type != pull_request AND (branch = master OR tag = true)
go:
- 1.11.x
os:
- linux
services:
- docker
before_script:
- nvm install node
- npm install -g npm
script:
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
- ./build_docker.sh
after_script:
2019-01-29 12:18:36 +00:00
- docker images