From 4d374727262ad8575502f17c7cccd4e65e4fce44 Mon Sep 17 00:00:00 2001 From: Stephan <57194608+stephan418@users.noreply.github.com> Date: Fri, 15 Oct 2021 11:40:39 +0200 Subject: [PATCH] Create workflow to check formatting The workflow checks whether all the files are formatted correctly (.prettierrc) --- .github/workflows/prettier-check.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 0000000..b594990 --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,28 @@ +# This workflow checks whether all files conform with the Prettier configuration + +name: Check prettier formatting + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + # Job to check the formatting + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install prettier + run: npm i -g prettier + + - name: Check formatting + run: prettier -c .