From 7a8379c7e48ee9c51e1bc7268d82e5c9534c1ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgars=20Egl=C4=ABtis?= Date: Mon, 27 Jan 2025 12:29:07 +0200 Subject: [PATCH] ci: run lint job for all changes --- .github/workflows/pr-validation-lint.yml | 27 ++++++++++++++++++++++++ .github/workflows/pr-validation.yml | 20 +----------------- 2 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/pr-validation-lint.yml diff --git a/.github/workflows/pr-validation-lint.yml b/.github/workflows/pr-validation-lint.yml new file mode 100644 index 0000000000..14a89d8d17 --- /dev/null +++ b/.github/workflows/pr-validation-lint.yml @@ -0,0 +1,27 @@ +# Code validation job, executed on pull request +# Runs linting and formatting tests + +name: PR Validation + +on: + pull_request: + branches: [main] + +jobs: + lint: + name: Lint & Format + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'npm' + - name: Install Dependencies + run: npm ci + - name: Lint + run: npm run test:lint + - name: Format + run: npm run test:format diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 28d753c118..a6c3f86656 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -1,5 +1,5 @@ # Code validation job, executed on pull request -# Builds the app, and runs lint, unit and integration tests +# Builds the app, and runs unit and integration tests name: PR Validation @@ -37,21 +37,3 @@ jobs: run: npm run build --if-present - name: Test run: npm run test:unit && npm run test:integration - - lint: - name: Lint & Format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js LTS - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'npm' - - name: Install Dependencies - run: npm ci - - name: Lint - run: npm run test:lint - - name: Format - run: npm run test:format