-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add swiftlint GH action (#3455)
* chore: add swiftlint GH action * chore: add xcodeproj with swiftlint build phase * chore: update git-blame-ignore-revs
- Loading branch information
1 parent
659e861
commit 3b2ceba
Showing
4 changed files
with
437 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Resolve SwiftLint errors and warnings | ||
# https://github.com/aws-amplify/amplify-swift/pull/3451 | ||
659e8615da059eea5b6a4ce1b77120eae293ebec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: SwiftLint | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
identifier: | ||
required: true | ||
type: string | ||
|
||
push: | ||
branches-ignore: | ||
- main | ||
- v1 | ||
- release | ||
- release-v1 | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: ${{ github.ref_name != 'main'}} | ||
|
||
jobs: | ||
run-swiftlint: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/realm/swiftlint:0.54.0 | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: SwiftLint | ||
run: | | ||
swiftlint --reporter github-actions-logging | ||
confirm-pass: | ||
runs-on: ubuntu-latest | ||
name: Confirm Passing SwiftLint | ||
if: ${{ !cancelled() }} | ||
needs: [ run-swiftlint ] | ||
env: | ||
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }} | ||
steps: | ||
- run: exit $EXIT_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.