From 5f72ae72134a845735c92694990043b20398d025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Schmelczer?= Date: Mon, 24 Jan 2022 21:14:52 +0100 Subject: [PATCH] Add linting CI --- .github/workflows/check-format-and-lint.yaml | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/check-format-and-lint.yaml diff --git a/.github/workflows/check-format-and-lint.yaml b/.github/workflows/check-format-and-lint.yaml new file mode 100644 index 0000000..7896d49 --- /dev/null +++ b/.github/workflows/check-format-and-lint.yaml @@ -0,0 +1,26 @@ +name: Check formatting and lint + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Restore dependencies + run: dotnet restore + - name: Lint + run: | + npm ci + npm run lint + + git diff + if [[ `git status --porcelain` ]]; then + exit 1 + fi