From 1d97b0d15794f7cf2cc070b64c661966676483ed Mon Sep 17 00:00:00 2001 From: InfiniteStash <117855276+InfiniteStash@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:00:28 +0000 Subject: [PATCH] Move UI validation into separate github action --- .github/workflows/build.yml | 5 ---- .github/workflows/frontend-lint.yml | 39 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/frontend-lint.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e954d46d..0b7b9cb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,11 +96,6 @@ jobs: git add --intent-to-add . git diff --stat --exit-code - - name: Validate UI - # skip UI validation for pull requests if UI is unchanged - if: ${{ github.event_name != 'pull_request' || steps.cache-ui.outputs.cache-hit != 'true' }} - run: make ui-validate - - name: Build UI # skip UI build for pull requests if UI is unchanged (UI was cached) # this means that the build version/time may be incorrect if the UI is diff --git a/.github/workflows/frontend-lint.yml b/.github/workflows/frontend-lint.yml new file mode 100644 index 00000000..ee8e1561 --- /dev/null +++ b/.github/workflows/frontend-lint.yml @@ -0,0 +1,39 @@ +name: Lint (frontend) +on: + push: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install PNPM + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Cache node packages + uses: actions/cache@v4 + env: + cache-name: cache-node_modules + with: + path: frontend/node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('frontend/pnpm-lock.yaml') }} + + - name: Install node packages + run: make pre-ui + + - name: Validate UI + run: make ui-validate