workflows: add linux-only tests

master
Dawid Dziurla 2020-08-24 18:46:50 +02:00 committed by Michka Popoff
parent 599a5cc5f3
commit d5faafd814
2 changed files with 38 additions and 0 deletions

24
.github/workflows/tests-linux.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: GitHub Actions CI
on:
pull_request:
paths:
- "Formula/libseccomp.rb"
jobs:
tests_linux:
runs-on: ubuntu-latest
container:
image: homebrew/ubuntu16.04:master
env:
HOMEBREW_CORE_GIT_REMOTE: ${{github.event.repository.html_url}}
HOMEBREW_FORCE_HOMEBREW_ON_LINUX: 1
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- run: brew test-bot --only-cleanup-before
- name: Run brew test-bot --only-formulae
run: |
mkdir ~/bottles
cd ~/bottles
brew test-bot --only-formulae

View File

@ -28,6 +28,20 @@ jobs:
- run: brew test-bot --only-tap-syntax
- name: Check .github/workflows/tests-linux.yml formulae coverage
run: |
FILES=$(grep -oE 'Formula/[a-z0-9_\.\-]+' .github/workflows/tests-linux.yml)
for FILE in $FILES; do
if [ ! -f "$FILE" ]; then
echo ".github/workflows/tests-linux.yml is testing a non existing file: $FILE"
exit 1
fi
if [ ! grep -q "depends_on :linux" "$FILE"]; then
echo "$FILE is not a linux-only formula."
exit 1
fi
done
tests:
needs: tap_syntax
if: github.event_name == 'pull_request' && ! contains(github.event.pull_request.labels.*.name, 'CI-syntax-only')