Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Nov 6, 2023
1 parent 3183cab commit 8f9e13e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 100 deletions.
102 changes: 2 additions & 100 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,52 +39,10 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.7']
python-version: ['3']
test-base: ['tests/f']
chunk: ['1/4', '2/4', '3/4', '4/4']
chunk: ['1/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.7'
test-base: 'tests/f'
chunk: '1/5'
platform: '_local_background*'
- name: 'macos 2/5'
os: 'macos-latest'
python-version: '3.7'
test-base: 'tests/f'
chunk: '2/5'
platform: '_local_background*'

env:
# Use non-UTC time zone
Expand Down Expand Up @@ -261,63 +219,7 @@ 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: |
etc/bin/swarm kill
- name: Combine coverage & report
run: |
coverage combine -a
coverage xml
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
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@v3

- name: Codecov upload
uses: codecov/codecov-action@v3
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 }}
3 changes: 3 additions & 0 deletions tests/functional/lib/bash/test_header
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ mock_smtpd_init() { # Logic borrowed from Rose
if ps "${SMTPD_PID}" 1>/dev/null 2>&1; then
sleep 1 # Still waiting for fake server to start
else # Server process failed
echo " " >&2
echo "::error::SMTP FAILED ON PORT ${SMTPD_PORT}" >&2
echo " " >&2
rm -f "${SMTPD_LOG}"
unset SMTPD_HOST SMTPD_LOG SMTPD_PID
break
Expand Down

0 comments on commit 8f9e13e

Please sign in to comment.