brew/.github/workflows/tests.yml
Mike McQuaid e002a39a42 workflows/tests: hardcode coveralls token.
This is just used to set test coverage and GitHub Actions doesn't have
a good "secrets for forks" story yet.
2019-08-21 08:35:13 +01:00

39 lines
1.1 KiB
YAML

name: GitHub Actions CI
on:
push:
branches: master
pull_request: []
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Set up Git repository
uses: actions/checkout@master
- name: Set up Homebrew
run: |
HOMEBREW_REPOSITORY="$(brew --repo)"
mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library"
sudo rm -rf "$HOMEBREW_REPOSITORY"
sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY"
brew update-reset Library/Taps/homebrew/homebrew-core
if: matrix.os == 'macOS-latest'
- name: Build Docker image
run: docker-compose -f Dockerfile.yml build sut
if: matrix.os == 'ubuntu-latest'
- name: Run brew test-bot
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
docker-compose -f Dockerfile.yml run --rm -v $GITHUB_WORKSPACE:/tmp/test-bot sut
else
brew test-bot
fi
env:
HOMEBREW_COVERALLS_REPO_TOKEN: 3F6U6ZqctoNJwKyREremsqMgpU3qYgxFk
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}