Skip to content

Commit

Permalink
ci: enforce code is formatted and linted before merging PRs
Browse files Browse the repository at this point in the history
commit-id:680f067f
  • Loading branch information
levibostian committed Apr 11, 2024
1 parent a3a5151 commit 1906ed4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on: [pull_request]

jobs:
assert-formatted:
name: Assert that code has been linted and formatted before merging
runs-on: macos-13
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: ./.github/actions/setup-ios
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run swiftformat. Fail if any errors.
run: task format && git diff --exit-code
- name: Run swiftlint. Fail if any errors.
run: task lint

0 comments on commit 1906ed4

Please sign in to comment.