Skip to content

Commit e69eda7

Browse files
authored
Merge pull request #3223 from mrmundt/skip-draft-prs
Skip Tests on Draft and WIP Pull Requests
2 parents 76fab1b + a0bc089 commit e69eda7

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Diff for: .github/workflows/test_pr_and_main.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
pull_request:
88
branches:
99
- main
10+
types:
11+
- opened
12+
- reopened
13+
- synchronize
14+
- ready_for_review
1015
workflow_dispatch:
1116
inputs:
1217
git-ref:
@@ -34,6 +39,8 @@ jobs:
3439
lint:
3540
name: lint/style-and-typos
3641
runs-on: ubuntu-latest
42+
if: |
43+
contains(github.event.pull_request.title, '[WIP]') != true && !github.event.pull_request.draft
3744
steps:
3845
- name: Checkout Pyomo source
3946
uses: actions/checkout@v4
@@ -734,7 +741,7 @@ jobs:
734741
cover:
735742
name: process-coverage-${{ matrix.TARGET }}
736743
needs: build
737-
if: always() # run even if a build job fails
744+
if: success() || failure() # run even if a build job fails, but not if cancelled
738745
runs-on: ${{ matrix.os }}
739746
timeout-minutes: 10
740747
strategy:

Diff for: doc/OnlineDocs/contribution_guide.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ at least 70% coverage of the lines modified in the PR and prefer coverage
7171
closer to 90%. We also require that all tests pass before a PR will be
7272
merged.
7373

74+
.. note::
75+
If you are having issues getting tests to pass on your Pull Request,
76+
please tag any of the core developers to ask for help.
77+
7478
The Pyomo main branch provides a Github Actions workflow (configured
7579
in the ``.github/`` directory) that will test any changes pushed to
7680
a branch with a subset of the complete test harness that includes
@@ -82,13 +86,16 @@ This will enable the tests to run automatically with each push to your fork.
8286

8387
At any point in the development cycle, a "work in progress" pull request
8488
may be opened by including '[WIP]' at the beginning of the PR
85-
title. This allows your code changes to be tested by the full suite of
86-
Pyomo's automatic
87-
testing infrastructure. Any pull requests marked '[WIP]' will not be
89+
title. Any pull requests marked '[WIP]' or draft will not be
8890
reviewed or merged by the core development team. However, any
8991
'[WIP]' pull request left open for an extended period of time without
9092
active development may be marked 'stale' and closed.
9193

94+
.. note::
95+
Draft and WIP Pull Requests will **NOT** trigger tests. This is an effort to
96+
reduce our CI backlog. Please make use of the provided
97+
branch test suite for evaluating / testing draft functionality.
98+
9299
Python Version Support
93100
++++++++++++++++++++++
94101

0 commit comments

Comments
 (0)