open-nomad/.circleci/config/jobs/test-windows.yml
Mahmood Ali e50fb91557 Few Windows CI changes:
Always install go and vault: the check may accidentally use the CircleCI
pre-installed go version instead of the cached version.

Also, always install from sources without caching.  Go/vault
installation is basically a tarball download.  That's equivalent to
CirleCI caching without the complexity.  These steps don't add much time
either.

Lastly, infer the OS when downloading tarball to avoid managing them in
the job spec.
2020-05-15 12:22:15 -04:00

43 lines
1.1 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: 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