From 2206a9b0aa22b7174637b0b654083cf03c3888fe Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:13:43 +0100 Subject: [PATCH 1/2] GH Actions: use ubuntu-22.04 to keep using python 3.7 --- .github/workflows/build.yml | 4 +++- .github/workflows/test_fast.yml | 5 +++-- .github/workflows/test_functional.yml | 8 ++++---- .github/workflows/test_tutorial_workflow.yml | 8 ++++++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 674542d4e63..acc86458619 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,10 @@ jobs: strategy: matrix: os: ['ubuntu-latest'] - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.8', '3.9', '3.10', '3.11'] include: + - os: 'ubuntu-22.04' + python: '3.7' - os: 'macos-latest' python: '3.8' steps: diff --git a/.github/workflows/test_fast.yml b/.github/workflows/test_fast.yml index b58bc50ed99..dd65adc5e52 100644 --- a/.github/workflows/test_fast.yml +++ b/.github/workflows/test_fast.yml @@ -20,9 +20,10 @@ jobs: fail-fast: false # don't stop on first failure matrix: os: ['ubuntu-latest'] - python-version: ['3.7', '3.8', '3.10', '3.11', '3'] + python-version: ['3.8', '3.10', '3.11', '3'] include: - # mac os test + - os: 'ubuntu-22.04' + python-version: '3.7' - os: 'macos-latest' python-version: '3.9' # oldest supported version # non-utc timezone test diff --git a/.github/workflows/test_functional.yml b/.github/workflows/test_functional.yml index f055353d904..309e0f8b6fe 100644 --- a/.github/workflows/test_functional.yml +++ b/.github/workflows/test_functional.yml @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest'] + os: ['ubuntu-22.04'] python-version: ['3.7'] test-base: ['tests/f'] chunk: ['1/4', '2/4', '3/4', '4/4'] @@ -56,20 +56,20 @@ jobs: platform: '_local_background*' # tests/k - name: 'flaky' - os: 'ubuntu-latest' + os: 'ubuntu-22.04' python-version: '3.7' test-base: 'tests/k' chunk: '1/1' platform: '_local_background* _local_at*' # remote platforms - name: '_remote_background_indep_poll' - os: 'ubuntu-latest' + os: 'ubuntu-22.04' python-version: '3.7' test-base: 'tests/f tests/k' chunk: '1/1' platform: '_remote_background_indep_poll _remote_at_indep_poll' - name: '_remote_background_indep_tcp' - os: 'ubuntu-latest' + os: 'ubuntu-22.04' test-base: 'tests/f tests/k' python-version: '3.7' chunk: '1/1' diff --git a/.github/workflows/test_tutorial_workflow.yml b/.github/workflows/test_tutorial_workflow.yml index 7859b8588e2..a0d2ec777b5 100644 --- a/.github/workflows/test_tutorial_workflow.yml +++ b/.github/workflows/test_tutorial_workflow.yml @@ -21,8 +21,12 @@ jobs: test: strategy: matrix: - python-version: ['3.7', '3'] - runs-on: ubuntu-latest + include: + - os: 'ubuntu-latest' + python-version: '3' + - os: 'ubuntu-22.04' + python-version: '3.7' + runs-on: ${{ matrix.os }} timeout-minutes: 10 steps: - name: configure python From 2a3e47957321950c8ec372f6ad6f6e3a9da9d7f9 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:13:55 +0100 Subject: [PATCH 2/2] Shellcheck --- etc/bin/swarm | 2 -- tests/flakyfunctional/cylc-poll/16-execution-time-limit.t | 1 + tests/flakyfunctional/xtriggers/00-wall_clock.t | 1 + tests/functional/lib/bash/test_header | 1 - tests/functional/reload/17-graphing-change.t | 1 + 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/bin/swarm b/etc/bin/swarm index 6e8c814d49e..77d5beba251 100755 --- a/etc/bin/swarm +++ b/etc/bin/swarm @@ -145,11 +145,9 @@ prompt () { case $USR in [Yy]) return 0 - break ;; [Nn]) return 1 - break ;; esac done diff --git a/tests/flakyfunctional/cylc-poll/16-execution-time-limit.t b/tests/flakyfunctional/cylc-poll/16-execution-time-limit.t index a01d42e2ab3..a7711318690 100755 --- a/tests/flakyfunctional/cylc-poll/16-execution-time-limit.t +++ b/tests/flakyfunctional/cylc-poll/16-execution-time-limit.t @@ -33,6 +33,7 @@ run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}" workflow_run_ok "${TEST_NAME_BASE}-run" \ cylc play --reference-test -v --no-detach "${WORKFLOW_NAME}" --timestamp #------------------------------------------------------------------------------- +# shellcheck disable=SC2317 cmp_times () { # Test if the times $1 and $2 are within $3 seconds of each other. python3 -u - "$@" <<'__PYTHON__' diff --git a/tests/flakyfunctional/xtriggers/00-wall_clock.t b/tests/flakyfunctional/xtriggers/00-wall_clock.t index 9e966f8cd52..49d9bbe20b8 100644 --- a/tests/flakyfunctional/xtriggers/00-wall_clock.t +++ b/tests/flakyfunctional/xtriggers/00-wall_clock.t @@ -18,6 +18,7 @@ # Test clock xtriggers . "$(dirname "$0")/test_header" +# shellcheck disable=SC2317 run_workflow() { cylc play --no-detach --debug "$1" \ -s "START='$2'" -s "HOUR='$3'" -s "OFFSET='$4'" diff --git a/tests/functional/lib/bash/test_header b/tests/functional/lib/bash/test_header index f9b58a35f75..ce0dd6165f7 100644 --- a/tests/functional/lib/bash/test_header +++ b/tests/functional/lib/bash/test_header @@ -1160,7 +1160,6 @@ for SKIP in ${CYLC_TEST_SKIP}; do # Deliberately print variable substitution syntax unexpanded # shellcheck disable=SC2016 skip_all 'this test is in $CYLC_TEST_SKIP.' - break fi done diff --git a/tests/functional/reload/17-graphing-change.t b/tests/functional/reload/17-graphing-change.t index 9df561384ff..41e0b4697c9 100755 --- a/tests/functional/reload/17-graphing-change.t +++ b/tests/functional/reload/17-graphing-change.t @@ -20,6 +20,7 @@ #------------------------------------------------------------------------------- set_test_number 12 +# shellcheck disable=SC2317 grep_workflow_log_n_times() { TEXT="$1" N_TIMES="$2"