diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml new file mode 100644 index 00000000000..b7d958baab3 --- /dev/null +++ b/.github/workflows/tests-linux.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d5730ff923..76af3d00270 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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')