open-nomad/.circleci/config/jobs/test-windows.yml

46 lines
1.3 KiB
YAML

executor: go-windows
steps:
- run: git config --global core.autocrlf false
- checkout
- run:
name: Setup
command: |
mkdir -p $GOBIN
mkdir -p $GOTESTSUM_PATH
- install-golang:
target_directory: "c:"
- run: go version
- install-vault:
version: $VAULT_VERSION
- run: vault version
- run: choco install make
- run:
name: Install golang dependencies
command: |
export PATH=$PATH:/c/go/bin:/c/gopath/bin
make deps
- run:
name: Pre-download docker test image
command: docker pull hashicorpnomad/busybox-windows:server2016-0.1
- run:
name: Build nomad
command: |
export PATH=$PATH:/c/go/bin:/c/gopath/bin
go build -o $GOBIN\nomad.exe
- run:
name: Run tests with gotestsum
command: |
# Only test docker driver tests for now
export PATH=$PATH:/c/go/bin:/c/gopath/bin
gotestsum --format=short-verbose \
--junitfile $GOTESTSUM_PATH/results.xml \
github.com/hashicorp/nomad/drivers/docker \
github.com/hashicorp/nomad/client/lib/fifo \
github.com/hashicorp/nomad/client/logmon
- store_test_results:
path: c:\tmp\test-reports
- store_artifacts:
path: c:\tmp\test-reports