Skip to content

Commit

Permalink
Add "run at HEAD" leg to cron job
Browse files Browse the repository at this point in the history
Our nightly cron job will now run our examples tests twice. First,
the normal run will happen. Next, we'll run again but use the latest
CLI and the latest versions of all our NPM packages.
  • Loading branch information
ellismg committed Nov 30, 2018
1 parent 88c84db commit 7f19daa
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if: branch = master
language: go
go: 1.9
go: 1.11
sudo: true # give us 7.5GB and >2 bursted cores.
git:
depth: false
depth: false
before_install:
- git clone https://github.com/pulumi/scripts ${GOPATH}/src/github.com/pulumi/scripts
- source ${GOPATH}/src/github.com/pulumi/scripts/ci/prepare-environment.sh
Expand All @@ -18,8 +18,12 @@ install:
- helm repo add bitnami https://charts.bitnami.com/bitnami
before_script:
- ${PULUMI_SCRIPTS}/ci/ensure-dependencies
script:
- go test ./misc/test/... --timeout 1h -v -count=1 -short
jobs:
include:
- script: make travis_${TRAVIS_EVENT_TYPE}
- stage: latest
if: type = cron
script: ${GOPATH}/src/github.com/pulumi/scripts/ci/run-at-head
after_failure:
- ${PULUMI_SCRIPTS}/ci/upload-failed-tests
notifications:
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
.PHONY: ensure only_build only_test all

all: only_build only_test

ensure:
cd misc/test && dep ensure -v

only_build:

only_test:
go test ./misc/test/... --timeout 1h -v -count=1 -short

# The travis_* targets are entrypoints for CI.
.PHONY: travis_cron travis_push travis_pull_request travis_api
travis_cron: all
travis_push: all
travis_pull_request: all
travis_api: all
6 changes: 3 additions & 3 deletions misc/test/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions misc/test/Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[[constraint]]
name = "github.com/pulumi/pulumi"
branch = "master"

5 changes: 5 additions & 0 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ func TestExamples(t *testing.T) {
if !assert.NoError(t, err, "expected a valid working directory: %v", err) {
return
}
overrides, err := integration.DecodeMapString(os.Getenv("PULUMI_TEST_NODE_OVERRIDES"))
if !assert.NoError(t, err, "expected valid override map: %v", err) {
return
}

base := integration.ProgramTestOptions{
Tracing: "https://tracing.pulumi-engineering.com/collector/api/v1/spans",
ExpectRefreshChanges: true,
Overrides: overrides,
}

examples := []integration.ProgramTestOptions{
Expand Down

0 comments on commit 7f19daa

Please sign in to comment.