Mist/.github/workflows/linting.yml
2022-12-25 16:03:49 +11:00

32 lines
1,003 B
YAML

name: Linting
on:
push:
paths:
- "**.swift"
pull_request:
paths:
- "**.swift"
branches:
- main
jobs:
linting:
name: Linting
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Print SwiftLint version
run: swiftlint --version
- name: Run SwiftLint
run: swiftlint --strict
- name: Download DrString
run: curl --location --remote-name https://github.com/dduan/DrString/releases/latest/download/drstring-x86_64-apple-darwin.tar.gz
- name: Extract DrString
run: |
mkdir drstring-x86_64-apple-darwin
tar --extract --file drstring-x86_64-apple-darwin.tar.gz --directory drstring-x86_64-apple-darwin
- name: Add DrString to $PATH
run: echo "$GITHUB_WORKSPACE/drstring-x86_64-apple-darwin" >> $GITHUB_PATH
- name: Print DrString version
run: drstring --version
- name: Run DrString
run: drstring check --config-file .drstring.toml