Merge pull request #1067 from prymitive/travis

fix(ci): fix travis condtions to allow fork PR jobs
This commit is contained in:
Łukasz Mierzwa
2019-10-23 13:58:13 +01:00
committed by GitHub

View File

@@ -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
@@ -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:
@@ -47,7 +47,7 @@ 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:
@@ -55,13 +55,13 @@ jobs:
- 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
@@ -69,7 +69,7 @@ jobs:
- 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
@@ -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
@@ -89,13 +89,13 @@ 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
@@ -103,13 +103,13 @@ jobs:
- 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:
@@ -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
@@ -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
@@ -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: