Commit 964e83a0 authored by Benoit Daloze's avatar Benoit Daloze
Browse files

Run script/mirror verify on GitHub Actions too

* So the shasums are checked in PRs.
parent 25e52813
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -11,5 +11,9 @@ jobs:
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - run: git clone --depth 1 https://github.com/sstephenson/bats.git
    - run: PATH="./bats/bin:$PATH" script/test
      env:
        COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
+8 −3
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -e
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 "$TRAVIS_COMMIT_RANGE"
elif [ "${TRAVIS_PULL_REQUEST:-false}" != "false" ]; then
  ./script/mirror verify "$TRAVIS_COMMIT_RANGE"
  ./script/mirror update "$COMMIT_RANGE"
elif [ "${TRAVIS_PULL_REQUEST:-false}" != "false" ] || [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
  ./script/mirror verify "$COMMIT_RANGE"
fi

exit "$STATUS"