ci: optimize workflows to cut redundant runs (#465)

* ci: optimize workflows to cut redundant runs and add timeout protection

Skip validation jobs (build, test, lint, Docker, E2E) on push-to-main
since code was already validated on the PR. Skip CI entirely for
release-please PRs (version bump only). Add timeout-minutes to all jobs
to prevent hung runners from burning 360 min (GitHub default). Add npm
caching to the start-app composite action. Add concurrency control to
docker-publish. Group Dependabot updates to batch PRs per ecosystem.

Estimated savings: ~10 min per release cycle, ~30-40 min/day.

* chore: add tsbuildinfo to gitignore
This commit is contained in:
Anso
2026-04-09 20:48:26 -04:00
committed by GitHub
parent 0e4a8e85e2
commit 8d3cae78e1
5 changed files with 43 additions and 3 deletions
+20 -3
View File
@@ -18,12 +18,16 @@ concurrency:
cancel-in-progress: true
# ---------------------------------------------------------------------------
# Build & Validation (runs on PRs and push to main)
# Build & Validation (PRs only, skipped for release-please PRs)
# ---------------------------------------------------------------------------
jobs:
backend:
name: Backend (Build, Test, Lint)
runs-on: ubuntu-latest
timeout-minutes: 10
if: >-
github.event_name == 'pull_request'
&& github.head_ref != 'release-please--branches--main--components--sencho'
steps:
- name: Checkout Code
uses: actions/checkout@v6
@@ -58,6 +62,10 @@ jobs:
frontend:
name: Frontend (Build, Lint)
runs-on: ubuntu-latest
timeout-minutes: 10
if: >-
github.event_name == 'pull_request'
&& github.head_ref != 'release-please--branches--main--components--sencho'
steps:
- name: Checkout Code
uses: actions/checkout@v6
@@ -88,6 +96,10 @@ jobs:
docker-validate:
name: Docker Build & Scan
runs-on: ubuntu-latest
timeout-minutes: 15
if: >-
github.event_name == 'pull_request'
&& github.head_ref != 'release-please--branches--main--components--sencho'
steps:
- name: Checkout Code
uses: actions/checkout@v6
@@ -117,12 +129,16 @@ jobs:
continue-on-error: true
# ---------------------------------------------------------------------------
# E2E Tests (runs on PRs and push to main)
# E2E Tests (PRs only, skipped for release-please PRs)
# ---------------------------------------------------------------------------
e2e:
name: E2E Tests (Playwright)
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [backend, frontend]
if: >-
github.event_name == 'pull_request'
&& github.head_ref != 'release-please--branches--main--components--sencho'
steps:
- name: Checkout Code
uses: actions/checkout@v6
@@ -154,11 +170,11 @@ jobs:
update-screenshots:
name: Refresh Doc Screenshots
runs-on: ubuntu-latest
timeout-minutes: 15
if: >-
github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& startsWith(github.event.head_commit.message, 'chore(main): release')
needs: [backend, frontend]
permissions:
contents: write
pull-requests: write
@@ -201,6 +217,7 @@ jobs:
sync-docs:
name: Sync Docs to sencho-docs
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout Sencho repo
+5
View File
@@ -6,10 +6,15 @@ on:
- 'v*'
workflow_dispatch:
concurrency:
group: docker-publish
cancel-in-progress: true
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out the repo
uses: actions/checkout@v6