Mist/.github/workflows/linting.yml

33 lines
1 KiB
YAML
Raw Normal View History

2022-12-07 22:58:16 -05:00
name: Linting
2022-12-09 19:49:02 -05:00
on:
push:
2023-04-22 02:13:23 -04:00
paths: ["**.swift"]
branches: [main]
2022-12-09 19:49:02 -05:00
pull_request:
2023-04-22 02:13:23 -04:00
paths: ["**.swift"]
branches: [main]
2023-06-22 09:00:51 -04:00
workflow_dispatch:
2022-12-07 03:15:10 -05:00
jobs:
2022-12-07 22:58:16 -05:00
linting:
name: Linting
2023-06-22 03:55:05 -04:00
runs-on: macos-13
2022-12-07 03:15:10 -05:00
steps:
- uses: actions/checkout@v3
2023-06-22 03:55:05 -04:00
- uses: swift-actions/setup-swift@v1
2022-12-07 03:15:10 -05:00
- 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