Skip to content

Commit

Permalink
updates README to be more precise on Travis setup
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancole committed Dec 6, 2020
1 parent ec31732 commit 7bedb4d
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions build-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ complete in less than a minute (10 credit cost).
Here's a partial `.travis.yml` including only the aspects mentioned above.
```yaml
git:
depth: false # full git history for license check, and doc-only skipping
depth: false # TRAVIS_COMMIT_RANGE requires full commit history.
jobs:
include:
- stage: test
if: branch = master AND tag IS blank AND type IN (push, pull_request)
name: Run unit and integration tests
before_install: |
before_install: | # Prevent test build of a documentation-only change.
if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then
echo "Stopping job as changes only affect documentation (ex. README.md)"
travis_terminate 0
Expand All @@ -107,6 +107,21 @@ jobs:
script: ./build-bin/test
```

When Travis only runs tests (something else does deploy), there's no need to use stages:
```yaml
git:
depth: false # TRAVIS_COMMIT_RANGE requires full commit history.
if: branch = master AND tag IS blank AND type IN (push, pull_request)
before_install: | # Prevent test build of a documentation-only change.
if [ -n "${TRAVIS_COMMIT_RANGE}" ] && ! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- | grep -qv '\.md$'; then
echo "Stopping job as changes only affect documentation (ex. README.md)"
travis_terminate 0
fi
install: ./build-bin/configure_test
script: ./build-bin/test
```

## Deploy

Deploy builds and pushes artifacts to a remote repository for master and release commits on it. CI
Expand Down

0 comments on commit 7bedb4d

Please sign in to comment.