Skip to content

Commit

Permalink
chore: optimize GitHub Actions workflow for test and run
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
MrMissx committed Jul 14, 2024
1 parent 26ee6be commit ce7b727
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ce7b727

Please sign in to comment.