2019-12-13 13:31:10 +03:00
|
|
|
if: repo = AdguardTeam/AdGuardHome
|
2018-08-30 18:16:37 +03:00
|
|
|
language: go
|
|
|
|
sudo: false
|
2019-01-29 15:11:11 +03:00
|
|
|
|
2018-08-30 18:16:37 +03:00
|
|
|
go:
|
2019-11-25 14:10:04 +03:00
|
|
|
- 1.13.x
|
2018-08-30 19:06:08 +03:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2019-01-04 21:00:06 +03:00
|
|
|
before_install:
|
|
|
|
- nvm install node
|
|
|
|
- npm install -g npm
|
2019-10-02 16:39:32 +03:00
|
|
|
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.19.1
|
2019-01-04 21:00:06 +03:00
|
|
|
|
2018-09-07 16:13:03 +03:00
|
|
|
install:
|
2018-09-07 16:14:43 +03:00
|
|
|
- npm --prefix client install
|
2018-09-07 16:13:03 +03:00
|
|
|
|
2019-01-29 15:11:11 +03:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/go-build
|
|
|
|
- $HOME/gopath/pkg/mod
|
|
|
|
- $HOME/Library/Caches/go-build
|
|
|
|
|
2018-08-30 18:16:37 +03:00
|
|
|
script:
|
2019-10-02 15:41:14 +03:00
|
|
|
- /bin/bash ci.sh
|
2018-08-30 18:16:37 +03:00
|
|
|
|
2019-01-25 12:55:13 +03:00
|
|
|
after_success:
|
2019-01-29 15:11:11 +03:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
|
|
2019-08-16 13:47:51 +03:00
|
|
|
notifications:
|
2019-08-16 16:08:56 +03:00
|
|
|
slack: performix:yXTihlSzsLFSZiqbXMNzvTSX
|
2019-08-16 13:47:51 +03:00
|
|
|
|
2019-01-29 15:11:11 +03:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# Release build configuration
|
2019-12-13 13:31:10 +03:00
|
|
|
- if: repo = AdguardTeam/AdGuardHome
|
2019-01-29 15:11:11 +03:00
|
|
|
- name: release
|
|
|
|
go:
|
2019-11-25 14:10:04 +03:00
|
|
|
- 1.13.x
|
2019-01-29 15:11:11 +03: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-12-13 13:31:10 +03:00
|
|
|
if: type != pull_request AND (branch = master OR tag IS present) AND repo = AdguardTeam/AdGuardHome
|
2019-01-29 15:11:11 +03:00
|
|
|
go:
|
2019-11-25 14:10:04 +03:00
|
|
|
- 1.13.x
|
2019-01-29 15:11:11 +03: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 15:18:36 +03:00
|
|
|
- docker images
|