workflows: add linux-only tests
parent
599a5cc5f3
commit
d5faafd814
|
@ -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
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue