From e8a4835f4ebe55519942e7b54032acbd5360d33f Mon Sep 17 00:00:00 2001 From: Nindi Gill Date: Wed, 7 Dec 2022 19:15:10 +1100 Subject: [PATCH] Add GitHub actions for linting --- .github/workflows/do_all_of_the_things.yml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/do_all_of_the_things.yml diff --git a/.github/workflows/do_all_of_the_things.yml b/.github/workflows/do_all_of_the_things.yml new file mode 100644 index 0000000..59cabe8 --- /dev/null +++ b/.github/workflows/do_all_of_the_things.yml @@ -0,0 +1,23 @@ +name: Do all of the things! +on: [push, pull_request] +jobs: + do-all-of-the-things: + name: Do all of the things! + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - uses: swift-actions/setup-swift@v1 + - name: Print SwiftLint version + run: swiftlint --version + - name: Run SwiftLint + run: swiftlint --strict + - name: Download DrString + run: curl --silent https://api.github.com/repos/dduan/DrString/releases/latest | grep "browser_download_url.*drstring-x86_64-apple-darwin.tar.gz" | awk '{ print $NF }' | tr -d '"' | curl --location --silent --output drstring-x86_64-apple-darwin.tar.gz + - name: Extract DrString + run: 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