-
Notifications
You must be signed in to change notification settings - Fork 577
GHA: run tests on draft PRs #3926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
7145359
1ae3738
643094f
5755212
13ee4c7
a4e03de
5a95227
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,8 @@ env: | |
| jobs: | ||
| lint: | ||
| name: lint/style-and-typos | ||
| if: | | ||
| ${{ ! ( contains(github.event.pull_request.title, '[WIP]') || | ||
| github.event.pull_request.draft ) }} | ||
| # Note: 'env' is not available in ght jobs.<job_id>.if context. | ||
| if: ${{ ! contains(github.event.pull_request.title, '[WIP]') }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Pyomo source | ||
|
|
@@ -62,7 +61,7 @@ jobs: | |
| sudo resolvectl query github.com | ||
| sudo resolvectl status | ||
| - name: URL Checker | ||
| if: env.PYOMO_WORKFLOW == 'branch' | ||
| if: ${{ env.PYOMO_WORKFLOW == 'branch' }} | ||
| uses: urlstechie/urlchecker-action@0.0.34 | ||
| with: | ||
| # A comma-separated list of file types to cover in the URL checks | ||
|
|
@@ -866,8 +865,8 @@ jobs: | |
| cover: | ||
| name: process-coverage-${{ matrix.TARGET }} | ||
| needs: build | ||
| # run even if a build job fails, but not if canceled (except for branches) | ||
| if: ${{ false }} | ||
| # run even if a build job fails, but not if canceled | ||
| if: ${{ success() || failure() }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 10 | ||
| strategy: | ||
|
|
@@ -976,7 +975,9 @@ jobs: | |
| fi | ||
|
|
||
| - name: Upload codecov reports | ||
| if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main' | ||
| if: | | ||
| env.PYOMO_WORKFLOW != 'branch' && | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really know what this is doing. Will this prevent people from running tests on branches on forks?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, this is just codecov. Never mind.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly: we were getting weird behavior on codecov when branches from forks (including the main branch on forks), and when the "branches" workflow would upload coverage results. THis logic makes sure that only the Pyomo main branch, as well as any PR builds are uploaded to codecov. |
||
| (github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main') | ||
| uses: codecov/codecov-action@v6 | ||
| with: | ||
| files: coverage.xml | ||
|
|
@@ -987,6 +988,7 @@ jobs: | |
|
|
||
| - name: Upload other coverage reports | ||
| if: | | ||
| env.PYOMO_WORKFLOW != 'branch' && | ||
| hashFiles('coverage-other.xml') != '' && | ||
| (github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main') | ||
| uses: codecov/codecov-action@v6 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.