Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Dec 27, 2024
1 parent d4edafa commit 55414a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 109 deletions.
113 changes: 6 additions & 107 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,92 +13,13 @@ concurrency:
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false # don't stop on first failure
matrix:
os: ['ubuntu-latest']
python-version: ['3.8', '3.10', '3.11', '3']
include:
- os: 'ubuntu-22.04'
python-version: '3.7'
- os: 'macos-latest'
python-version: '3.9' # oldest supported version
# non-utc timezone test
- os: 'ubuntu-latest'
python-version: '3.9' # not the oldest, not the most recent version
time-zone: 'XXX-09:35'

env:
TZ: ${{ matrix.time-zone }}
PYTEST_ADDOPTS: --cov --cov-append -n 5 --color=yes

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Apt-Get Install
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y sqlite3
- name: Patch DNS
uses: cylc/release-actions/patch-dns@v1

- name: Install
run: |
pip install -e ."[all]"
- name: Configure git # Needed by the odd test
uses: cylc/release-actions/configure-git@v1

- name: Unit Tests
timeout-minutes: 5
run: |
pytest cylc/flow tests/unit
- name: Integration Tests
timeout-minutes: 5
run: |
pytest tests/integration --ignore tests/integration/tui/
- name: Tui Integration Tests
timeout-minutes: 5
# Re-run failed Tui tests as they can be flaky
run: |
pytest tests/integration/tui || pytest tests/integration/tui --last-failed
- name: Upload failed tests artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: cylc-run (${{ matrix.os }} py-${{ matrix.python-version }})
path: ~/cylc-run/
include-hidden-files: true

- name: Coverage report
run: |
coverage xml
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.os }}_py-${{ matrix.python-version }}
path: coverage.xml
retention-days: 7

lint:
runs-on: 'ubuntu-latest'
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: [3.9, 3]
steps:
- name: Apt-Get Install
run: |
Expand All @@ -113,7 +34,7 @@ jobs:
- name: Configure Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}

- name: Install
run: |
Expand All @@ -130,32 +51,10 @@ jobs:
run: etc/bin/shellchecker

- name: MyPy
run: mypy
run: mypy --python-version 3.8

- name: Towncrier - draft changelog
uses: cylc/release-actions/towncrier-draft@v1

- name: Linkcheck
run: pytest -m linkcheck --dist=load --color=yes -n 10 tests/unit/test_links.py

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@v5
with:
name: ${{ github.workflow }}
flags: fast-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/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async def dump(workflow_id, options, write=print):
result += " (" + ",".join(attrs) + ")"
if options.show_flows:
result += (
f" flows={item['flowNums'].replace(' ','')}"
f" flows={item['flowNums'].replace(' ', '')}"
)
write(result)

Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/scripts/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ async def prereqs_and_outputs_query(
if t_proxy["flowNums"] != "[1]":
ansiprint(
f"<bold>flows:</bold> "
f"{t_proxy['flowNums'].replace(' ','')}"
f"{t_proxy['flowNums'].replace(' ', '')}"
)

# prerequisites
Expand Down

0 comments on commit 55414a7

Please sign in to comment.