Skip to content

Commit

Permalink
Hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jun 19, 2024
1 parent 15891c7 commit d42d533
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 72 deletions.
76 changes: 5 additions & 71 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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: |
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion cylc/flow/scripts/cylc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit d42d533

Please sign in to comment.