From d42d5339e80511e16c7491f5ec01edc7a1f344f8 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:56:55 +0100 Subject: [PATCH] Hmm --- .github/workflows/test_functional.yml | 76 ++------------------------- cylc/flow/scripts/cylc.py | 2 +- 2 files changed, 6 insertions(+), 72 deletions(-) diff --git a/.github/workflows/test_functional.yml b/.github/workflows/test_functional.yml index 4720378a989..c5b2b8286f4 100644 --- a/.github/workflows/test_functional.yml +++ b/.github/workflows/test_functional.yml @@ -33,15 +33,14 @@ concurrency: jobs: test: runs-on: ${{ matrix.os }} - name: ${{ matrix.name || matrix.chunk }} timeout-minutes: 45 strategy: fail-fast: false matrix: - os: ['macos-latest'] - python-version: ['3.9'] + os: ['macos-latest', 'ubuntu-latest'] + python-version: ['3.9', '3.7', '3.12'] test-base: ['tests/f'] - chunk: ['1/5', '2/5', '3/5', '4/5'] + chunk: ['1/1'] platform: ['_local_background*'] env: @@ -167,21 +166,6 @@ jobs: - name: Configure git # Needed by the odd test uses: cylc/release-actions/configure-git@v1 - - name: Filter Tests - env: - # NOTE: we only want the CHUNK set in this step else we will - # re-chunk tests later when they run - CHUNK: ${{ matrix.chunk }} - run: | - etc/bin/run-functional-tests \ - --dry \ - ${{ matrix.test-base }} \ - > test-file - if [[ $REMOTE_PLATFORM == 'true' ]]; then - # skip tests that don't configure platform requirements - grep -l --color=never REQUIRE_PLATFORM $(cat test-file) > test-file - fi - - name: Test id: test timeout-minutes: 35 @@ -197,7 +181,7 @@ jobs: etc/bin/run-functional-tests \ -j "${NPROC}" \ --state=save \ - $(cat test-file) \ + tests/f/cli/01-help.t \ || (echo "finished=true" >> $GITHUB_OUTPUT && false) - name: Time Out @@ -218,7 +202,7 @@ jobs: etc/bin/run-functional-tests \ -j 1 \ -v \ - --state=save,failed $(cat test-file) + --state=save,failed tests/f/cli/01-help.t - name: Copy cylc-run out of container if: failure() && steps.test.outcome == 'failure' && env.REMOTE_PLATFORM == 'true' @@ -256,27 +240,6 @@ jobs: name: cylc-run (${{ steps.uploadname.outputs.uploadname }}) path: ~/cylc-run/ - - name: Fetch Remote Coverage - if: env.REMOTE_PLATFORM == 'true' - run: | - # pick the first host in the list - host="$(cut -d ' ' -f 1 <<< "${{ matrix.platform }}")" - # copy back the remote coverage files - rsync -av \ - "${host}:/cylc/" \ - '.' \ - --include='.coverage*' \ - --exclude='*' \ - >rsyncout - cat rsyncout - # fiddle the python source location to match the local system - for db in $(grep --color=never '.coverage\.' rsyncout); do - sqlite3 "$db" " - UPDATE file - SET path = REPLACE(path, '/cylc/cylc/', '$PWD/cylc/') - " - done - - name: Shutdown if: always() run: | @@ -287,32 +250,3 @@ jobs: coverage combine -a coverage xml coverage report - - - name: Upload coverage artifact - uses: actions/upload-artifact@v4 - with: - name: coverage_${{ steps.uploadname.outputs.uploadname }} - path: coverage.xml - retention-days: 7 - - codecov: - needs: test - runs-on: ubuntu-latest - timeout-minutes: 2 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Download coverage artifacts - uses: actions/download-artifact@v4 - - - name: Codecov upload - uses: codecov/codecov-action@v4 - with: - name: ${{ github.workflow }} - flags: functional-tests - fail_ci_if_error: true - verbose: true - # Token not required for public repos, but avoids upload failure due - # to rate-limiting (but not for PRs opened from forks) - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/cylc/flow/scripts/cylc.py b/cylc/flow/scripts/cylc.py index cabcec553e9..cd881d4a7fb 100644 --- a/cylc/flow/scripts/cylc.py +++ b/cylc/flow/scripts/cylc.py @@ -88,7 +88,7 @@ def get_version(long=False): from pathlib import Path version = f"{__version__}" if long: - version += f" ({Path(sys.executable).parent.parent})" + version += f" ({Path(sys.argv[0]).parent.parent})" return version