Files
heroku-buildpack-python/.travis.yml
T
Ed Morley 95fca53d38 Travis: Correctly skip Hatchet on PRs from forks (#1045)
The Hatchet run requires a valid Heroku login, the credentials for which
are set via Travis secure environment variables, which by design are not
revealed to PRs from forks.

The previous conditional wasn't working as intended - the Hatchet job
was still being triggered for forks from PRs.

The new conditional fixes this, and also means that forks could set
their own credentials via Travis environment variables if they wanted
a way to run the tests in CI on their own repo.

See:
https://docs.travis-ci.com/user/conditions-v1

Fixes #1019.
Closes @W-7918482@.

[skip changelog]
2020-08-12 11:17:38 +01:00

42 lines
1.0 KiB
YAML

language: minimal
dist: bionic
branches:
only:
- main
script:
- make test STACK="${STACK}" TEST_CMD="${TEST_CMD}"
jobs:
include:
- name: Bash linting (shellcheck)
script: make check
- name: Hatchet integration tests
if: env(HEROKU_API_USER) IS present AND env(HEROKU_API_KEY) IS present
language: ruby
rvm:
- 2.7
before_script:
- bundle exec hatchet ci:setup
script:
- PARALLEL_SPLIT_TEST_PROCESSES=11 bundle exec parallel_split_test spec/hatchet/
env:
jobs:
- STACK=cedar-14 TEST_CMD=test/run-deps
- STACK=cedar-14 TEST_CMD=test/run-versions
- STACK=cedar-14 TEST_CMD=test/run-features
- STACK=heroku-16 TEST_CMD=test/run-deps
- STACK=heroku-16 TEST_CMD=test/run-versions
- STACK=heroku-16 TEST_CMD=test/run-features
- STACK=heroku-18 TEST_CMD=test/run-deps
- STACK=heroku-18 TEST_CMD=test/run-versions
- STACK=heroku-18 TEST_CMD=test/run-features
global:
- HATCHET_RETRIES=3
- IS_RUNNING_ON_CI=true
- HATCHET_APP_LIMIT=80
- HATCHET_DEPLOY_STRATEGY=git