Only do script/mirror update on TravisCI

* Testing is done on GitHub Actions which is much faster.
This commit is contained in:
Benoit Daloze 2021-07-07 20:00:14 +02:00
parent 964e83a039
commit ebdcf0c26e
3 changed files with 9 additions and 8 deletions

View file

@ -1,6 +1,6 @@
sudo: false
install: git clone --depth 1 https://github.com/sstephenson/bats.git
script: PATH="./bats/bin:$PATH" script/test
script: PATH="./bats/bin:$PATH" script/travis
language: c
notifications:
email:

View file

@ -5,13 +5,7 @@ set -x
STATUS=0
bats ${CI:+--tap} test || STATUS="$?"
if [ -n "$TRAVIS_COMMIT_RANGE" ]; then
COMMIT_RANGE="$TRAVIS_COMMIT_RANGE"
fi
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
./script/mirror update "$COMMIT_RANGE"
elif [ "${TRAVIS_PULL_REQUEST:-false}" != "false" ] || [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
./script/mirror verify "$COMMIT_RANGE"
fi

7
script/travis Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
set -x
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
./script/mirror update "$TRAVIS_COMMIT_RANGE"
fi