docs: Update README.md #14
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
name: SwiftLint | |
on: | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/swiftlint.yml' | |
- './.swiftlint.yml' | |
- './**/*.swift' | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Run SwiftLint | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache Homebrew | |
id: cache-brew | |
uses: actions/cache@v3 | |
with: | |
path: /usr/local/Homebrew | |
key: ${{ runner.os }}-brew-${{ hashFiles('**/*.swift') }} | |
restore-keys: | | |
${{ runner.os }}-brew- | |
- name: Install Homebrew | |
if: steps.cache-brew.outputs.cache-hit != 'true' | |
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
- name: Install SwiftLint | |
run: brew install swiftlint | |
- name: Run SwiftLint | |
run: swiftlint --fix --strict --config ./.swiftlint.yml |