Skip to content

Commit f1b1d53

Browse files
committed
optimize: eliminate redundant testing after PR merge
- Only run tests on pull requests, skip on pushes to main - Remove test job dependency from deploy-docs job - Maintain manual trigger capability for both jobs - Speeds up documentation deployment by eliminating ~15s redundant testing - Maintains security with tests still required on all PRs Following project conventions: - Branch-based development workflow - Tests run before merge via PR - Documentation deploys immediately after merge - Manual triggers preserved for troubleshooting
1 parent a3219fc commit f1b1d53

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ concurrency:
1515
jobs:
1616
test:
1717
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
18+
# Only run tests on pull requests, skip on pushes to main
19+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
1820
runs-on: ${{ matrix.os }}
1921
strategy:
2022
fail-fast: false
@@ -40,10 +42,9 @@ jobs:
4042
4143
deploy-docs:
4244
name: Deploy Documentation
43-
runs-on: ubuntu-latest
44-
needs: test
45-
# Only deploy on push to main (not on PRs) OR manual trigger
45+
# Only run deployment on pushes to main (after merge) or manual trigger
4646
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
47+
runs-on: ubuntu-latest
4748
steps:
4849
- uses: actions/checkout@v4
4950
- uses: julia-actions/setup-julia@v1

0 commit comments

Comments
 (0)