From f1b0558913c52c154e70a18a18f4d8afd4d8c6df Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 5 Apr 2023 20:19:31 +0200 Subject: [PATCH] Run automatic linting for the webapp --- .github/workflows/yarnlint.yml | 22 ++++++++++++++++++++++ README.md | 1 + 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/yarnlint.yml diff --git a/.github/workflows/yarnlint.yml b/.github/workflows/yarnlint.yml new file mode 100644 index 00000000..f1c912c9 --- /dev/null +++ b/.github/workflows/yarnlint.yml @@ -0,0 +1,22 @@ +name: Yarn Linting + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js and yarn + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "yarn" + cache-dependency-path: "webapp/yarn.lock" + + - name: Install WebApp dependencies + run: yarn --cwd webapp install --frozen-lockfile + + - name: Linting + run: yarn --cwd webapp lint \ No newline at end of file diff --git a/README.md b/README.md index 195536d4..ecd05e69 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![OpenDTU Build](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml/badge.svg)](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml) [![cpplint](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml/badge.svg)](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml) +[![Yarn Linting](https://github.com/tbnobody/OpenDTU/actions/workflows/yarnlint.yml/badge.svg)](https://github.com/tbnobody/OpenDTU/actions/workflows/yarnlint.yml) ## !! IMPORTANT UPGRADE NOTES !!