From ce7b72786d7624233e53deb9de86f25caa8012e3 Mon Sep 17 00:00:00 2001 From: MrMissx Date: Sun, 14 Jul 2024 22:41:22 +0700 Subject: [PATCH] chore: optimize GitHub Actions workflow for test and run - Removed "master" branch from the push and pull_request triggers to only run on the "staging" branch - Added concurrency settings to cancel in-progress workflows and group them by workflow and branch --- .github/workflows/run-test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 37c3bb400..3b9ff26a6 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -5,9 +5,13 @@ name: Test and Run on: push: - branches: ["staging", "master"] + branches: ["staging"] pull_request: - branches: ["staging", "master"] + branches: ["staging"] + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} jobs: pytest: @@ -52,7 +56,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v4 @@ -87,7 +91,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v4