-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and test Go Webserver. Build Hugo website.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
pool: | ||
vmImage: 'Ubuntu-16.04' | ||
|
||
variables: | ||
GOROOT: '/usr/local/go1.11' # Go installation path | ||
GO111MODULE: on | ||
HUGO_VERSION: 0.53 | ||
HUGO_SHA: 0e4424c90ce5c7a0c0f7ad24a558dd0c2f1500256023f6e3c0004f57a20ee119 | ||
|
||
steps: | ||
- script: | | ||
echo '##vso[task.prependpath]$(GOROOT)/bin' | ||
displayName: 'Prepare Go Environment' | ||
|
||
- script: | | ||
go version | ||
go get -v . | ||
workingDirectory: 'src' | ||
displayName: 'Get Go Webserver Dependencies' | ||
|
||
- script: | | ||
go version | ||
go build -v . | ||
workingDirectory: 'src' | ||
displayName: 'Build Go Webserver' | ||
|
||
- script: | | ||
go version | ||
go test | ||
workingDirectory: 'src' | ||
displayName: 'Execute Go Webserver Tests' | ||
|
||
- script: | | ||
mkdir hugobin | ||
wget -O ${HUGO_VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz | ||
echo "${HUGO_SHA} ${HUGO_VERSION}.tar.gz" | sha256sum -c | ||
tar xf ${HUGO_VERSION}.tar.gz --directory=hugobin hugo | ||
rm -r ${HUGO_VERSION}.tar.gz | ||
hugobin/hugo version | ||
displayName: 'Prepare Hugo Environment' | ||
|
||
- script: | | ||
../hugobin/hugo version | ||
../hugobin/hugo | ||
displayName: 'Build Hugo Website' | ||
workingDirectory: 'hugo' |