2022-12-07 22:58:16 -05:00
|
|
|
name: Linting
|
2022-12-07 03:15:10 -05:00
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
2022-12-07 22:58:16 -05:00
|
|
|
linting:
|
|
|
|
name: Linting
|
2022-12-07 03:15:10 -05:00
|
|
|
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
|
2022-12-07 21:03:05 -05:00
|
|
|
run: curl --location --remote-name https://github.com/dduan/DrString/releases/latest/download/drstring-x86_64-apple-darwin.tar.gz
|
2022-12-07 03:15:10 -05:00
|
|
|
- name: Extract DrString
|
2022-12-07 21:07:23 -05:00
|
|
|
run: |
|
|
|
|
mkdir drstring-x86_64-apple-darwin
|
|
|
|
tar --extract --file drstring-x86_64-apple-darwin.tar.gz --directory drstring-x86_64-apple-darwin
|
2022-12-07 03:15:10 -05:00
|
|
|
- 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
|