From fe0296f8bebed0e8594c9c1c87d1e9f94b92fd3e Mon Sep 17 00:00:00 2001 From: wyattb Date: Thu, 12 Mar 2026 05:46:04 -0400 Subject: [PATCH 1/3] #229 Optimize CI workflows: combine lint/prettier, add path filters - Combine lint-check.yml and prettier-check.yml into a single client-ci.yml that runs both checks in one job (single npm install), with path filter on angular-client/ so it only triggers on client changes - Add scylla-server/ path filter to scylla-ci.yml so it skips on unrelated changes - Add path filters to build-check.yml (angular-client/, scylla-server/, compose/) to skip Docker Compose builds on unrelated changes - Standardize Node.js version to 20.17.0 (was 18.17.1 for prettier) - Use npm ci instead of npm install for faster, deterministic installs Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/build-check.yml | 10 +++++- .../{lint-check.yml => client-ci.yml} | 14 +++++++-- .github/workflows/prettier-check.yml | 31 ------------------- .github/workflows/scylla-ci.yml | 4 +++ 4 files changed, 24 insertions(+), 35 deletions(-) rename .github/workflows/{lint-check.yml => client-ci.yml} (72%) delete mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index c5aa7aba..a3e448ba 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -1,14 +1,22 @@ name: Build -on: +on: push: branches: - main - develop + paths: + - "angular-client/**" + - "scylla-server/**" + - "compose/**" pull_request: branches: - main - develop - 'feature/**' + paths: + - "angular-client/**" + - "scylla-server/**" + - "compose/**" jobs: run-build: runs-on: ubuntu-latest diff --git a/.github/workflows/lint-check.yml b/.github/workflows/client-ci.yml similarity index 72% rename from .github/workflows/lint-check.yml rename to .github/workflows/client-ci.yml index ebafd660..1f48300d 100644 --- a/.github/workflows/lint-check.yml +++ b/.github/workflows/client-ci.yml @@ -1,17 +1,22 @@ -name: Linting Check +name: Client CI + on: push: branches: - main - develop + paths: + - "angular-client/**" pull_request: branches: - main - develop - "feature/**" + paths: + - "angular-client/**" jobs: - run-linting-check: + lint-and-format: runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -25,7 +30,10 @@ jobs: cache-dependency-path: ./angular-client/package-lock.json - name: Install modules working-directory: ./angular-client - run: npm install + run: npm ci - name: Run linting check working-directory: ./angular-client run: npm run lint --max-warnings=0 + - name: Run prettier check + working-directory: ./angular-client + run: npm run prettier-check diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml deleted file mode 100644 index 9e7a961d..00000000 --- a/.github/workflows/prettier-check.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Prettier Check -on: - push: - branches: - - main - - develop - pull_request: - branches: - - main - - develop - - "feature/**" - -jobs: - run-prettier-check: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: 18.17.1 - cache: "npm" - cache-dependency-path: ./angular-client/package-lock.json - - name: Install modules - working-directory: ./angular-client - run: npm install - - name: Run prettier check - working-directory: ./angular-client - run: npm run prettier-check diff --git a/.github/workflows/scylla-ci.yml b/.github/workflows/scylla-ci.yml index 3a059c71..960b8a49 100644 --- a/.github/workflows/scylla-ci.yml +++ b/.github/workflows/scylla-ci.yml @@ -5,11 +5,15 @@ on: branches: - main - develop + paths: + - "scylla-server/**" pull_request: branches: - main - develop - 'feature/**' + paths: + - "scylla-server/**" defaults: From e7f85026aa807c4d575cbfe8cb53389edba04f7f Mon Sep 17 00:00:00 2001 From: wyattb Date: Sun, 29 Mar 2026 14:20:08 -0400 Subject: [PATCH 2/3] #229 Add self-trigger paths and use docker compose v2 --- .github/workflows/build-check.yml | 12 +++--------- .github/workflows/client-ci.yml | 2 ++ .github/workflows/scylla-ci.yml | 2 ++ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index a3e448ba..2f7e4ab1 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -8,6 +8,7 @@ on: - "angular-client/**" - "scylla-server/**" - "compose/**" + - ".github/workflows/build-check.yml" pull_request: branches: - main @@ -17,6 +18,7 @@ on: - "angular-client/**" - "scylla-server/**" - "compose/**" + - ".github/workflows/build-check.yml" jobs: run-build: runs-on: ubuntu-latest @@ -25,14 +27,6 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Set up Docker Compose - run: | - sudo apt-get -y update - sudo apt-get -y install docker-compose - name: Build Docker Compose working-directory: compose - run: | - if ! docker-compose build; then - echo "Docker Compose build failed." - exit 1 # This will cause the workflow to fail - fi + run: docker compose build diff --git a/.github/workflows/client-ci.yml b/.github/workflows/client-ci.yml index 1f48300d..8564e713 100644 --- a/.github/workflows/client-ci.yml +++ b/.github/workflows/client-ci.yml @@ -7,6 +7,7 @@ on: - develop paths: - "angular-client/**" + - ".github/workflows/client-ci.yml" pull_request: branches: - main @@ -14,6 +15,7 @@ on: - "feature/**" paths: - "angular-client/**" + - ".github/workflows/client-ci.yml" jobs: lint-and-format: diff --git a/.github/workflows/scylla-ci.yml b/.github/workflows/scylla-ci.yml index 960b8a49..2acf1d1f 100644 --- a/.github/workflows/scylla-ci.yml +++ b/.github/workflows/scylla-ci.yml @@ -7,6 +7,7 @@ on: - develop paths: - "scylla-server/**" + - ".github/workflows/scylla-ci.yml" pull_request: branches: - main @@ -14,6 +15,7 @@ on: - 'feature/**' paths: - "scylla-server/**" + - ".github/workflows/scylla-ci.yml" defaults: From e9166ce14760adab71498025116ea35976cf95ed Mon Sep 17 00:00:00 2001 From: wyattb Date: Sun, 29 Mar 2026 14:20:48 -0400 Subject: [PATCH 3/3] #229 Fix lint flag passthrough and DRY working-directory --- .github/workflows/client-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/client-ci.yml b/.github/workflows/client-ci.yml index 8564e713..7cca63f4 100644 --- a/.github/workflows/client-ci.yml +++ b/.github/workflows/client-ci.yml @@ -17,6 +17,10 @@ on: - "angular-client/**" - ".github/workflows/client-ci.yml" +defaults: + run: + working-directory: angular-client + jobs: lint-and-format: runs-on: ubuntu-latest @@ -29,13 +33,10 @@ jobs: with: node-version: 20.17.0 cache: "npm" - cache-dependency-path: ./angular-client/package-lock.json + cache-dependency-path: angular-client/package-lock.json - name: Install modules - working-directory: ./angular-client run: npm ci - name: Run linting check - working-directory: ./angular-client - run: npm run lint --max-warnings=0 + run: npm run lint -- --max-warnings=0 - name: Run prettier check - working-directory: ./angular-client run: npm run prettier-check