mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-01-01 14:44:48 +01:00
Run script/mirror verify on GitHub Actions too
* So the shasums are checked in PRs.
This commit is contained in:
parent
25e52813b6
commit
964e83a039
2 changed files with 12 additions and 3 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -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 }}
|
||||
|
|
11
script/test
11
script/test
|
@ -1,13 +1,18 @@
|
|||
#!/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"
|
||||
|
|
Loading…
Reference in a new issue