Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): fix travis condtions to allow fork PR jobs #1067

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
include:
- stage: Test
name: Test Go code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_GO
before_script:
- travis_retry make mock-assets
Expand All @@ -38,7 +38,7 @@ jobs:

- stage: Test
name: Test JavaScript code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
script: make test-js
after_success:
Expand All @@ -47,29 +47,29 @@ jobs:
# duplicate js test but with a different time zone, to ensure that tests/code work with non-UTC time zone
- stage: Test
name: Test JavaScript code with Pacific/Easter time zone
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
script: env TZ=Pacific/Easter make test-js
after_success:
- travis_retry curl -s --connect-timeout 30 --fail https://codecov.io/bash | bash -s -- -F ui

- stage: Lint
name: Lint git commit
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
script: make lint-git-ci

- stage: Lint
name: Lint Go code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_GO
before_script:
- travis_retry make mock-assets
script: make lint-go

- stage: Lint
name: Check Go code formatting
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_GO
before_script:
- travis_retry make mock-assets
Expand All @@ -79,7 +79,7 @@ jobs:

- state: Lint
name: Verify go.sum
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_GO
script:
- travis_retry make mock-assets
Expand All @@ -89,27 +89,27 @@ jobs:

- stage: Lint
name: Lint JavaScript code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
script: make lint-js

- stage: Lint
name: Check JavaScript code formatting
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
script:
- make format-js
- git diff --exit-code

- stage: Lint
name: Lint documentation
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
script: make lint-docs

- stage: Lint
name: Verify OpenAPI client code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
language: generic
addons:
apt:
Expand All @@ -121,7 +121,7 @@ jobs:

- stage: Snapshots
name: Percy UI snapshots
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_JS
env:
- NODE_ENV=test
Expand All @@ -130,7 +130,7 @@ jobs:

- stage: Build and Deploy
name: Cross compile binaries
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request) OR (fork = true AND type = pull_request)
<<: *DEFAULTS_GO
env:
# add an extra env so we don't push cross compilation cache into the main archive
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
name: Build docker image
# we build and push docker image on merge and tag, so this should only
# run for new branches, to test that they don't break docker builds
if: (repo = prymitive/karma AND type != pull_request AND tag IS NOT present) OR (repo != prymitive/karma AND type = pull_request)
if: (repo = prymitive/karma AND type != pull_request AND branch != master) OR (fork = true AND type = pull_request)
language: generic
addons:
apt:
Expand Down