lint.yml 982 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Lint
  2. run-name: Lint (${{ github.head_ref || github.ref_name }})
  3. on:
  4. pull_request:
  5. workflow_dispatch:
  6. concurrency:
  7. group: lint-${{ github.ref }}
  8. cancel-in-progress: true
  9. permissions:
  10. contents: read
  11. jobs:
  12. swiftformat:
  13. name: SwiftFormat
  14. runs-on: ubuntu-latest
  15. container: swift:6.0
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v5
  19. - name: Cache SwiftFormat build
  20. uses: actions/cache@v4
  21. with:
  22. path: BuildTools/.build
  23. key: ${{ runner.os }}-swiftformat-${{ hashFiles('BuildTools/Package.resolved', 'BuildTools/Package.swift') }}
  24. restore-keys: |
  25. ${{ runner.os }}-swiftformat-
  26. - name: SwiftFormat --lint
  27. run: |
  28. swift run -c release --package-path BuildTools swiftformat . \
  29. --lint \
  30. --header "LoopFollow\n{file}" \
  31. --exclude Pods,Generated,R.generated.swift,fastlane/swift,Dependencies,dexcom-share-client-swift