check.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: check
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths-ignore:
  6. - 'Firestore/**'
  7. push:
  8. branches: main
  9. concurrency:
  10. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  11. cancel-in-progress: true
  12. jobs:
  13. check:
  14. # Don't run on private repo.
  15. if: github.repository == 'Firebase/firebase-ios-sdk'
  16. runs-on: ubuntu-latest
  17. env:
  18. MINT_PATH: ${{ github.workspace }}/mint
  19. steps:
  20. - uses: actions/checkout@v4
  21. - uses: actions/setup-python@v5
  22. with:
  23. python-version: 3.11
  24. - name: Cache Mint packages
  25. uses: actions/cache@v4
  26. with:
  27. path: ${{ env.MINT_PATH }}
  28. key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
  29. restore-keys: ${{ runner.os }}-mint-
  30. - name: Setup check
  31. run: |
  32. eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  33. scripts/setup_check.sh
  34. - name: Check
  35. run: |
  36. eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  37. # Add Homebrew clang-format to first in PATH
  38. export PATH="/home/linuxbrew/.linuxbrew/opt/clang-format/bin:$PATH"
  39. scripts/check.sh --test-only