From fb9f79dee1445990042be93759080b23b99e732c Mon Sep 17 00:00:00 2001 From: Jonas Kruckenberg Date: Wed, 14 Dec 2022 20:35:29 +0100 Subject: [PATCH] unifiy workflows --- .github/workflows/format-javascript.yml | 44 ------------------------- .github/workflows/lint-javascript.yml | 25 ++++++++++++-- 2 files changed, 23 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/format-javascript.yml diff --git a/.github/workflows/format-javascript.yml b/.github/workflows/format-javascript.yml deleted file mode 100644 index b91770fd..00000000 --- a/.github/workflows/format-javascript.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Format JavaScript - -on: - push: - branches: - - dev - paths: - - '.github/workflows/format-javascript.yml' - - 'plugins/*/guest-js/**' - - '.prettierignore' - - "**/package.json" - pull_request: - branches: - - dev - paths: - - '.github/workflows/format-javascript.yml' - - 'plugins/*/guest-js/**' - - '.prettierignore' - - "**/package.json" - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - audit-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Cache pnpm modules - uses: actions/cache@v3 - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}- - - uses: actions/setup-node@v3 - with: - node-version: 18 - - uses: pnpm/action-setup@v2.2.4 - with: - run_install: true - - name: prettier check - run: pnpm format-check \ No newline at end of file diff --git a/.github/workflows/lint-javascript.yml b/.github/workflows/lint-javascript.yml index 37d63456..d834ec47 100644 --- a/.github/workflows/lint-javascript.yml +++ b/.github/workflows/lint-javascript.yml @@ -9,6 +9,7 @@ on: - 'plugins/*/guest-js/**' - '.eslintignore' - '.eslintrc.json' + - '.prettierignore' - "**/package.json" pull_request: branches: @@ -18,6 +19,7 @@ on: - 'plugins/*/guest-js/**' - '.eslintignore' - '.eslintrc.json' + - '.prettierignore' - "**/package.json" concurrency: @@ -25,7 +27,7 @@ concurrency: cancel-in-progress: true jobs: - audit-js: + eslint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -43,4 +45,23 @@ jobs: with: run_install: true - name: eslint - run: pnpm lint \ No newline at end of file + run: pnpm lint + prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cache pnpm modules + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + - uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: pnpm/action-setup@v2.2.4 + with: + run_install: true + - name: prettier check + run: pnpm format-check \ No newline at end of file