Replace Danger with SwiftLint to improve warnings (#293)

Looks like the Danger action duplicates warning comments. The new SwiftLint action does not, although warnings only show up in the diff view, which I think is an acceptable trade-off.
This commit is contained in:
Max Desiatov 2020-10-27 21:43:42 +00:00 committed by GitHub
parent 1e43d98bb2
commit 94dc934fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 23 deletions

View File

@ -1,23 +0,0 @@
# This is a basic workflow to help you get started with Actions
name: Danger
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
pull_request:
branches: [main]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
danger-lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Danger Swift
uses: maxdesiatov/danger-swift@swiftlint-docker
if: github.event.pull_request.head.repo.full_name == github.repository
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

18
.github/workflows/swiftlint.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: SwiftLint
on:
pull_request:
paths:
- ".github/workflows/swiftlint.yml"
- ".swiftlint.yml"
- "**/*.swift"
jobs:
SwiftLint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.1.0
env:
DIFF_BASE: ${{ github.base_ref }}