From 93243d646ecc6885a5f71fea923f502595cd45af Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Mon, 12 Jan 2026 18:02:40 +0530 Subject: [PATCH] ci: improve workflow efficiency with best practices - Limit workflow triggers to main branch for pushes - Run tests on PRs targeting any branch - Add concurrency control to cancel outdated workflow runs - Set 15-minute timeout to prevent hung jobs - Follows GitHub Actions best practices for open-source projects --- .github/workflows/test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a20a689f..66056f6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,19 @@ name: Run Tests -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: runs-on: ${{ matrix.os }} + timeout-minutes: 15 strategy: fail-fast: false