mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-23 13:35:38 +03:00
7ec4aa91ea
* commit '2dc2a0946a28f41736228db1065654716907c5b8': Fix #595 - Start using GO 1.12
81 lines
1.5 KiB
YAML
81 lines
1.5 KiB
YAML
language: go
|
|
sudo: false
|
|
|
|
go:
|
|
- 1.12.x
|
|
- 1.x
|
|
os:
|
|
- linux
|
|
- osx
|
|
|
|
before_install:
|
|
- nvm install node
|
|
- npm install -g npm
|
|
|
|
install:
|
|
- npm --prefix client install
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.cache/go-build
|
|
- $HOME/gopath/pkg/mod
|
|
- $HOME/Library/Caches/go-build
|
|
|
|
script:
|
|
- node -v
|
|
- npm -v
|
|
# Run tests
|
|
- go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
|
|
# Make
|
|
- make build/static/index.html
|
|
- make
|
|
|
|
after_success:
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
|
matrix:
|
|
include:
|
|
# Release build configuration
|
|
- name: release
|
|
go:
|
|
- 1.12.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 IS present)
|
|
go:
|
|
- 1.12.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:
|
|
- docker images
|