diff --git a/.github/workflows/yarnlint.yml b/.github/workflows/yarnlint.yml new file mode 100644 index 0000000..f1c912c --- /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 195536d..ecd05e6 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 !!