workflows/tests: tweak behaviour by OS.

This should speed up Homebrew/brew testing by not running generic or
no-compat tests on macOS.
This commit is contained in:
Mike McQuaid 2019-11-27 14:01:39 +00:00
parent 9aa42f081b
commit a6c3ee02dd
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -56,10 +56,15 @@ jobs:
export HOMEBREW_CI_BRANCH="$HEAD_GITHUB_REF" export HOMEBREW_CI_BRANCH="$HEAD_GITHUB_REF"
export HOMEBREW_GITHUB_REPOSITORY="$GITHUB_REPOSITORY" export HOMEBREW_GITHUB_REPOSITORY="$GITHUB_REPOSITORY"
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin" # don't bother running all tests on both platforms (for speed)
if [ "$RUNNER_OS" = "Linux" ]; then
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/bin:/bin"
brew tests --no-compat --online brew tests --no-compat --online
brew tests --generic --online brew tests --generic --online
brew tests --online
else
brew tests --online --coverage brew tests --online --coverage
fi
env: env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}