From a16520560ff922d0cc5981bf71ea22e595150801 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 29 Oct 2020 21:19:48 -0700 Subject: [PATCH 1/2] Add CI workflow to check formatting --- .github/workflows/check-formatting.yml | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/check-formatting.yml diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml new file mode 100644 index 000000000..92e1de761 --- /dev/null +++ b/.github/workflows/check-formatting.yml @@ -0,0 +1,46 @@ +name: Check formatting + +on: + push: + paths: + - ".github/workflows/check-formatting.yml" + - "Taskfile.yml" + - ".prettierrc" + - "**.go" + - "**.json" + - "**.md" + - "**.yaml" + - "**.yml" + pull_request: + paths: + - ".github/workflows/check-formatting.yml" + - "Taskfile.yml" + - ".prettierrc" + - "**.go" + - "**.json" + - "**.md" + - "**.yaml" + - "**.yml" + +jobs: + check-formatting: + runs-on: ubuntu-latest + + steps: + - name: Checkout local repository + uses: actions/checkout@v2 + + - name: Install Taskfile + uses: arduino/actions/setup-taskfile@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Check Go code formatting + run: task go:check-formatting + + - name: Check documentation formatting + run: task docs:check-formatting + + - name: Check configuration file formatting + run: task config:check-formatting From b21fbe0aeb0364d9e15b09e72def883bcf89c604 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 29 Oct 2020 21:08:00 -0700 Subject: [PATCH 2/2] Make "Lint documentation" workflow formatting Prettier-compliant The previous formatting causes the "Check formatting" CI workflow to fail. --- .github/workflows/lint-documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-documentation.yml b/.github/workflows/lint-documentation.yml index b5635bdc9..b571839d6 100644 --- a/.github/workflows/lint-documentation.yml +++ b/.github/workflows/lint-documentation.yml @@ -33,7 +33,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: - ruby-version: ruby # Install latest version + ruby-version: ruby # Install latest version - name: Install licensee run: gem install licensee