34
34
CACHE_VER : v221013.1
35
35
36
36
SRC_REF : ${{ github.head_ref || github.ref }}
37
+ PYOMO_WORKFLOW : |
38
+ ${{ ( contains(github.event.pull_request.title, '[WIP]') ||
39
+ github.event.pull_request.draft ) && 'draft_pr'
40
+ || github.event.pull_request.number && 'pr' || 'main' }}
37
41
38
42
jobs :
39
43
lint :
40
44
name : lint/style-and-typos
41
- runs-on : ubuntu-latest
42
45
if : |
43
- contains(github.event.pull_request.title, '[WIP]') != true && !github.event.pull_request.draft
46
+ ${{ ! ( contains(github.event.pull_request.title, '[WIP]') ||
47
+ github.event.pull_request.draft ) }}
48
+ runs-on : ubuntu-latest
44
49
steps :
45
50
- name : Checkout Pyomo source
46
51
uses : actions/checkout@v4
57
62
uses : crate-ci/typos@master
58
63
with :
59
64
config : ./.github/workflows/typos.toml
65
+ - name : URL Checker
66
+ if : env.PYOMO_WORKFLOW == 'branch'
67
+ uses :
urlstechie/[email protected]
68
+ with :
69
+ # A comma-separated list of file types to cover in the URL checks
70
+ file_types : .md,.rst,.py
71
+ # Choose whether to include file with no URLs in the prints.
72
+ print_all : false
73
+ # More verbose summary at the end of a run
74
+ verbose : true
75
+ # How many times to retry a failed request (defaults to 1)
76
+ retry_count : 3
77
+ # Exclude Jenkins because it's behind a firewall; ignore RTD because
78
+ # a magically-generated string is triggering a failure
79
+ exclude_urls : https://pyomo-jenkins.sandia.gov/,https://pyomo.readthedocs.io/en/%s/errors.html
60
80
61
81
62
82
build :
@@ -843,7 +863,8 @@ jobs:
843
863
cover :
844
864
name : process-coverage-${{ matrix.TARGET }}
845
865
needs : build
846
- if : success() || failure() # run even if a build job fails, but not if cancelled
866
+ # run even if a build job fails, but not if canceled (except for branches)
867
+ if : success() || failure()
847
868
runs-on : ${{ matrix.os }}
848
869
timeout-minutes : 10
849
870
strategy :
@@ -914,26 +935,6 @@ jobs:
914
935
$PYTHON_EXE -c "from pyomo.dataportal.parse_datacmds import \
915
936
parse_data_commands; parse_data_commands(data='')"
916
937
917
- - name : Update codecov uploader
918
- run : |
919
- set +e
920
- CODECOV="${GITHUB_WORKSPACE}/codecov.sh"
921
- echo "CODECOV=$CODECOV" >> $GITHUB_ENV
922
- for i in `seq 3`; do
923
- echo "Downloading current codecov script (attempt ${i})"
924
- curl -L https://codecov.io/bash -o $CODECOV
925
- if test $? == 0; then
926
- break
927
- fi
928
- DELAY=$(( RANDOM % 30 + 30))
929
- echo "Pausing $DELAY seconds before re-attempting download"
930
- sleep $DELAY
931
- done
932
- if test ! -e $CODECOV; then
933
- echo "Failed to download codecov.sh"
934
- exit 1
935
- fi
936
-
937
938
- name : Combine coverage reports
938
939
if : github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
939
940
run : |
@@ -972,7 +973,7 @@ jobs:
972
973
973
974
- name : Upload codecov reports
974
975
if : github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
975
- uses : codecov/codecov-action@v4
976
+ uses : codecov/codecov-action@v5
976
977
with :
977
978
files : coverage.xml
978
979
token : ${{ secrets.PYOMO_CODECOV_TOKEN }}
@@ -984,7 +985,7 @@ jobs:
984
985
if : |
985
986
hashFiles('coverage-other.xml') != '' &&
986
987
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
987
- uses : codecov/codecov-action@v4
988
+ uses : codecov/codecov-action@v5
988
989
with :
989
990
files : coverage-other.xml
990
991
token : ${{ secrets.PYOMO_CODECOV_TOKEN }}
0 commit comments