2018-08-30 08:16:37 -07:00
|
|
|
language: go
|
|
|
|
sudo: false
|
2019-01-29 05:11:11 -07:00
|
|
|
|
2018-08-30 08:16:37 -07:00
|
|
|
go:
|
2019-02-26 05:32:56 -07:00
|
|
|
- 1.12.x
|
2018-09-07 06:13:23 -07:00
|
|
|
- 1.x
|
2018-08-30 09:06:08 -07:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2019-01-04 11:00:06 -07:00
|
|
|
before_install:
|
|
|
|
- nvm install node
|
|
|
|
- npm install -g npm
|
|
|
|
|
2018-09-07 06:13:03 -07:00
|
|
|
install:
|
2018-09-07 06:14:43 -07:00
|
|
|
- npm --prefix client install
|
2018-09-07 06:13:03 -07:00
|
|
|
|
2019-01-29 05:11:11 -07:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/go-build
|
|
|
|
- $HOME/gopath/pkg/mod
|
|
|
|
- $HOME/Library/Caches/go-build
|
|
|
|
|
2018-08-30 08:16:37 -07:00
|
|
|
script:
|
2019-01-04 11:00:06 -07:00
|
|
|
- node -v
|
|
|
|
- npm -v
|
2019-01-25 02:55:13 -07:00
|
|
|
# Run tests
|
|
|
|
- go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
# Make
|
2018-11-29 05:05:29 -07:00
|
|
|
- make build/static/index.html
|
2018-09-07 06:13:03 -07:00
|
|
|
- make
|
2018-08-30 08:16:37 -07:00
|
|
|
|
2019-01-25 02:55:13 -07:00
|
|
|
after_success:
|
2019-01-29 05:11:11 -07:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# Release build configuration
|
|
|
|
- name: release
|
|
|
|
go:
|
2019-02-26 05:32:56 -07:00
|
|
|
- 1.12.x
|
2019-01-29 05:11:11 -07:00
|
|
|
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
|
2019-02-25 09:15:27 -07:00
|
|
|
if: type != pull_request AND (branch = master OR tag IS present)
|
2019-01-29 05:11:11 -07:00
|
|
|
go:
|
2019-02-26 05:32:56 -07:00
|
|
|
- 1.12.x
|
2019-01-29 05:11:11 -07:00
|
|
|
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 05:18:36 -07:00
|
|
|
- docker images
|