From a1daed57c2bc559cd90af7c081557e9cb2b2a195 Mon Sep 17 00:00:00 2001 From: Emil Ibatullin Date: Tue, 19 Sep 2023 08:39:33 +0200 Subject: [PATCH] Check prettier on CI --- .github/workflows/lint.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..1bc546e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,37 @@ +name: Lint +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + timeout-minutes: 10 + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [18] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + # This is important to fetch the changes to the previous commit + fetch-depth: 0 + + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: yarn install + + - name: Prettify code + uses: creyD/prettier_action@v4.3 + with: + prettier_options: --dry --check + only_changed: True