Skip to content

Commit

Permalink
Tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Aug 27, 2024
1 parent cadf1ef commit 793a883
Showing 1 changed file with 5 additions and 117 deletions.
122 changes: 5 additions & 117 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,53 +40,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.7']
os: ['macos-latest']
python-version: ['3.9']
test-base: ['tests/f']
chunk: ['1/4', '2/4', '3/4', '4/4']
platform: ['_local_background* _local_at*']
# NOTE: includes must define ALL of the matrix values
include:
# latest python
- name: 'py-3-latest'
os: 'ubuntu-latest'
python-version: '3'
test-base: 'tests/f'
chunk: '1/4'
platform: '_local_background*'
# tests/k
- name: 'flaky'
os: 'ubuntu-latest'
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'
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'
test-base: 'tests/f tests/k'
python-version: '3.7'
chunk: '1/1'
platform: '_remote_background_indep_tcp _remote_at_indep_tcp'
# macos
- name: 'macos 1/5'
os: 'macos-latest'
python-version: '3.9'
test-base: 'tests/f'
chunk: '1/5'
platform: '_local_background*'
- name: 'macos 2/5'
os: 'macos-latest'
python-version: '3.9'
test-base: 'tests/f'
chunk: '2/5'
platform: '_local_background*'
chunk: ['1/1']
platform: ['_local_background*']

env:
# Use non-UTC time zone
Expand Down Expand Up @@ -194,21 +152,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 @@ -224,7 +167,7 @@ jobs:
etc/bin/run-functional-tests \
-j "${NPROC}" \
--state=save \
$(cat test-file) \
tests/f/xtriggers/04-sequential.t tests/f/data-store/00-prune-optional-break.t tests/f/reload/26-stalled.t tests/f/triggering/08-fam-finish-any.t tests/f/flow-triggers/10-specific-flow.t tests/f/cylc-set/08-switch2.t \
|| (echo "finished=true" >> $GITHUB_OUTPUT && false)
- name: Time Out
Expand Down Expand Up @@ -284,63 +227,8 @@ jobs:
path: ~/cylc-run/
include-hidden-files: true

- 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: |
etc/bin/swarm kill
- name: Combine coverage & report
run: |
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 }}

0 comments on commit 793a883

Please sign in to comment.