How to run Integration just when merging to master
up vote
1
down vote
favorite
I've Travis CI which is working as expected for Go application
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
This CI takes about a 60-80 sec
to run.
The CI is triggered in two scenarios
- Submitting to new branch
- Merging to the master
Now I've new file which is called integration_test.go
which is running integration test which takes about 10 min (deployment etc)
and I want to run this test only when merging to the master (since its more heavy) , and not run when submitting to branches, how it can be done it Travis?
I've tried with
on:
branch: master
condition: `go test -v integration_test.go`
git go github travis-ci travis-ci-cli
|
show 2 more comments
up vote
1
down vote
favorite
I've Travis CI which is working as expected for Go application
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
This CI takes about a 60-80 sec
to run.
The CI is triggered in two scenarios
- Submitting to new branch
- Merging to the master
Now I've new file which is called integration_test.go
which is running integration test which takes about 10 min (deployment etc)
and I want to run this test only when merging to the master (since its more heavy) , and not run when submitting to branches, how it can be done it Travis?
I've tried with
on:
branch: master
condition: `go test -v integration_test.go`
git go github travis-ci travis-ci-cli
Have you tried reading the Travis docs on conditional functionality?
– jonrsharpe
Nov 17 at 19:17
@jonrsharpe - yep I try it without success, see my edit please, do you know what am I missing here ?
– Rayn D
Nov 17 at 19:22
That's just not how conditional stages work; see docs.travis-ci.com/user/conditional-builds-stages-jobs
– jonrsharpe
Nov 17 at 19:27
@jonrsharpe - Ok thanks but How should I tell it run only this testif: branch = master
go test -v integration_test.go`` ?
– Rayn D
Nov 17 at 19:29
@jonrsharpe - can you provide a reference for my issue please?
– Rayn D
Nov 17 at 19:30
|
show 2 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I've Travis CI which is working as expected for Go application
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
This CI takes about a 60-80 sec
to run.
The CI is triggered in two scenarios
- Submitting to new branch
- Merging to the master
Now I've new file which is called integration_test.go
which is running integration test which takes about 10 min (deployment etc)
and I want to run this test only when merging to the master (since its more heavy) , and not run when submitting to branches, how it can be done it Travis?
I've tried with
on:
branch: master
condition: `go test -v integration_test.go`
git go github travis-ci travis-ci-cli
I've Travis CI which is working as expected for Go application
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
This CI takes about a 60-80 sec
to run.
The CI is triggered in two scenarios
- Submitting to new branch
- Merging to the master
Now I've new file which is called integration_test.go
which is running integration test which takes about 10 min (deployment etc)
and I want to run this test only when merging to the master (since its more heavy) , and not run when submitting to branches, how it can be done it Travis?
I've tried with
on:
branch: master
condition: `go test -v integration_test.go`
git go github travis-ci travis-ci-cli
git go github travis-ci travis-ci-cli
edited Nov 18 at 8:51
Flimzy
36.1k96496
36.1k96496
asked Nov 17 at 19:16
Rayn D
1251621
1251621
Have you tried reading the Travis docs on conditional functionality?
– jonrsharpe
Nov 17 at 19:17
@jonrsharpe - yep I try it without success, see my edit please, do you know what am I missing here ?
– Rayn D
Nov 17 at 19:22
That's just not how conditional stages work; see docs.travis-ci.com/user/conditional-builds-stages-jobs
– jonrsharpe
Nov 17 at 19:27
@jonrsharpe - Ok thanks but How should I tell it run only this testif: branch = master
go test -v integration_test.go`` ?
– Rayn D
Nov 17 at 19:29
@jonrsharpe - can you provide a reference for my issue please?
– Rayn D
Nov 17 at 19:30
|
show 2 more comments
Have you tried reading the Travis docs on conditional functionality?
– jonrsharpe
Nov 17 at 19:17
@jonrsharpe - yep I try it without success, see my edit please, do you know what am I missing here ?
– Rayn D
Nov 17 at 19:22
That's just not how conditional stages work; see docs.travis-ci.com/user/conditional-builds-stages-jobs
– jonrsharpe
Nov 17 at 19:27
@jonrsharpe - Ok thanks but How should I tell it run only this testif: branch = master
go test -v integration_test.go`` ?
– Rayn D
Nov 17 at 19:29
@jonrsharpe - can you provide a reference for my issue please?
– Rayn D
Nov 17 at 19:30
Have you tried reading the Travis docs on conditional functionality?
– jonrsharpe
Nov 17 at 19:17
Have you tried reading the Travis docs on conditional functionality?
– jonrsharpe
Nov 17 at 19:17
@jonrsharpe - yep I try it without success, see my edit please, do you know what am I missing here ?
– Rayn D
Nov 17 at 19:22
@jonrsharpe - yep I try it without success, see my edit please, do you know what am I missing here ?
– Rayn D
Nov 17 at 19:22
That's just not how conditional stages work; see docs.travis-ci.com/user/conditional-builds-stages-jobs
– jonrsharpe
Nov 17 at 19:27
That's just not how conditional stages work; see docs.travis-ci.com/user/conditional-builds-stages-jobs
– jonrsharpe
Nov 17 at 19:27
@jonrsharpe - Ok thanks but How should I tell it run only this test
if: branch = master
go test -v integration_test.go`` ?– Rayn D
Nov 17 at 19:29
@jonrsharpe - Ok thanks but How should I tell it run only this test
if: branch = master
go test -v integration_test.go`` ?– Rayn D
Nov 17 at 19:29
@jonrsharpe - can you provide a reference for my issue please?
– Rayn D
Nov 17 at 19:30
@jonrsharpe - can you provide a reference for my issue please?
– Rayn D
Nov 17 at 19:30
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
What you're likely looking for here is a 'Conditional job'. Using the example here:
https://docs.travis-ci.com/user/build-stages/matrix-expansion/
try:
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
jobs:
include:
- stage: integration
if: branch = master
script: go test -v integration_test.go
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
What you're likely looking for here is a 'Conditional job'. Using the example here:
https://docs.travis-ci.com/user/build-stages/matrix-expansion/
try:
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
jobs:
include:
- stage: integration
if: branch = master
script: go test -v integration_test.go
add a comment |
up vote
2
down vote
accepted
What you're likely looking for here is a 'Conditional job'. Using the example here:
https://docs.travis-ci.com/user/build-stages/matrix-expansion/
try:
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
jobs:
include:
- stage: integration
if: branch = master
script: go test -v integration_test.go
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
What you're likely looking for here is a 'Conditional job'. Using the example here:
https://docs.travis-ci.com/user/build-stages/matrix-expansion/
try:
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
jobs:
include:
- stage: integration
if: branch = master
script: go test -v integration_test.go
What you're likely looking for here is a 'Conditional job'. Using the example here:
https://docs.travis-ci.com/user/build-stages/matrix-expansion/
try:
language: go
go:
- "1.10.x"
script:
- go get -v -t -d ./...
- go test -v ./...
jobs:
include:
- stage: integration
if: branch = master
script: go test -v integration_test.go
answered Nov 17 at 19:41
nbp
382
382
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53354651%2fhow-to-run-integration-just-when-merging-to-master%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried reading the Travis docs on conditional functionality?
– jonrsharpe
Nov 17 at 19:17
@jonrsharpe - yep I try it without success, see my edit please, do you know what am I missing here ?
– Rayn D
Nov 17 at 19:22
That's just not how conditional stages work; see docs.travis-ci.com/user/conditional-builds-stages-jobs
– jonrsharpe
Nov 17 at 19:27
@jonrsharpe - Ok thanks but How should I tell it run only this test
if: branch = master
go test -v integration_test.go`` ?– Rayn D
Nov 17 at 19:29
@jonrsharpe - can you provide a reference for my issue please?
– Rayn D
Nov 17 at 19:30