Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
- name: Install sophios 🔧
run: |
pip install .[test]
# The tests marked package and the Nextflow tests that do not run
# Nextflow: no other pull-request lane runs them.
- name: Test with pytest
run: |
python -m pytest -k test_cwl_docker_extract
python -m pytest -m "not skip_pypi_ci and not nextflow" -k "not test_cwl_docker_extract" -vv
python -m pytest -m "package and not nextflow and not skip_pypi_ci" -vv

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this change, this job ran -m "not skip_pypi_ci and not nextflow", nearly the whole suite. It was the only PR lane for about 94 test functions, which now run only in the weekly lanes. Most of them are fast core tests: test_lang_parser.py (32), test_lang_schema.py (11), test_names_emitted.py (10), test_lang_render.py (9), test_canonical_path.py and test_reference_compatibility.py (6 each), and test_leak_boundary.py (5). The corpus parse and round-trip checks over the in-repo tutorials (test_corpus_files_parse, test_corpus_round_trips, test_accepts_the_whole_corpus) are now marked cwl_corpus, but neither Run Workflows nor Lint And Test collects them. Only Property Weekly runs them. So the new cwl_corpus marker text in pyproject.toml and the header of python_matrix_weekly.yml overstate where they run.

After this change, a parser, schema or emitted-name regression passes PR CI and shows up only in the weekly run. Could these fast files keep a PR lane, either by marking them package or by giving them a Lint And Test step?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right that these no longer gate PRs. Putting all 94 back as they are isn't the fix, though. About 35 of them are already properties, and most of the rest are examples written before the property in the same file covered them, or checks on how a module is built rather than what it does. test_parse_case alone runs 137 inline snippets. A follow-up on top of this stack folds them into about 25 tests, one property per rule plus a few readable .wic examples in files for the diagnostics and the emitted names, and those gate PRs again. Until it lands they run in the weekly lanes.

On cwl_corpus: CORPUS (tests/core/wic_corpus.py) is whatever search_paths_wic reaches. That is the same discovery test_run_workflows_on_push runs, and in CI it covers mm-workflows, image-workflows and docs/tutorials. The in-repo fallback is only what Property Weekly sees, because it has no config. So the marker is right. You're also right that no PR lane collects these three: Run Workflows picks its tests by name. The follow-up makes them one corpus test.

python -m pytest tests/core/nextflow -m "not nextflow and not nextflow_corpus and not skip_pypi_ci" -vv

- name: Build sophios
run: |
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,13 @@ jobs:
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: cd sophios/ && pytest tests/core/test_entry_points.py tests/core/test_ci_coverage.py

# The packaging lane runs `pytest -m "not skip_pypi_ci"`, so a test with
# that marker runs only where a step names its file. This is that place,
# filtered to exactly the complement so nothing here is run twice: these
# files' unmarked tests are already covered by the packaging lane's
# default collection. tests/core/test_ci_coverage.py fails if a
# skip_pypi_ci test exists that no lane collects, which is how these came
# to light — 26 of them had never executed anywhere; only the files its
# LOCAL_ONLY names, which no lane can run, are run by hand instead.
# The release lane runs `pytest -m "not skip_pypi_ci"` and the package job
# leaves that marker out too, so a test with it runs only where a step
# names its file. This is that place, filtered to exactly the complement
# so nothing here is run twice. tests/core/test_ci_coverage.py fails if a
# test exists that no pull-request or weekly lane collects, which is how
# these came to light; only the files its LOCAL_ONLY names, which no lane
# can run, are run by hand instead.
- name: PyTest Environment-Dependent
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
timeout-minutes: 20
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/python_matrix_weekly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Python Matrix Weekly

# The Nextflow tests on every Python Sophios supports, on Ubuntu: the plain
# ones the package job runs on 3.11, and the ones that run Nextflow.
# The whole suite on every Python Sophios supports, on Ubuntu, set up as Lint And
# Test sets up its Linux leg. The corpora need the sibling repositories, which
# the other lanes check out: cwl_corpus is Run Workflows' and Lint And Test's,
# nextflow_corpus is Run Workflows', and skip_pypi_ci is what a hosted runner
# cannot run.

on:
schedule:
Expand All @@ -11,8 +14,12 @@ on:
permissions:
contents: read

defaults:
run:
shell: bash -l {0}

jobs:
nextflow:
suite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -21,8 +28,14 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: actions/setup-python@v6
- name: Setup miniforge
uses: conda-incubator/setup-miniconda@v4.0.1
with:
miniforge-variant: Miniforge3
miniforge-version: 24.7.1-2
environment-file: install/system_deps.yml
activate-environment: wic
channels: conda-forge
python-version: ${{ matrix.python }}

- uses: actions/setup-java@v5
Expand All @@ -31,7 +44,7 @@ jobs:
java-version: '17'

- name: Install Sophios
run: pip install ".[test]"
run: pip install -e ".[all_except_runner_src]"

- name: Install pinned Nextflow
env:
Expand All @@ -42,10 +55,10 @@ jobs:
echo "${RUNNER_TEMP}" >> "${GITHUB_PATH}"
NXF_ANSI_LOG=false "${RUNNER_TEMP}/nextflow" -version | grep 'version 26.10.5'

- name: PyTest Nextflow
timeout-minutes: 20
- name: PyTest the suite without its corpora
timeout-minutes: 60
env:
NXF_ANSI_LOG: "false"
NXF_OFFLINE: "true"
NXF_VER: "26.10.5"
run: pytest tests/core/nextflow -m "not nextflow_corpus"
run: pytest tests -m "not cwl_corpus and not nextflow_corpus and not skip_pypi_ci"
5 changes: 2 additions & 3 deletions .github/workflows/run_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@ jobs:
run: cd sophios/ && pytest tests/core/test_python_api_workflow.py -k "not test_compile_python_workflows"

# Workflow.from_wic and write_wic over every .wic root the config reaches.
# Only here does the config reach the mm-workflows and image-workflows
# roots: the packaging lane, which also selects this file, checks out
# neither, so a round trip that breaks on those roots alone was green.
# No other lane runs this round trip over the mm-workflows and
# image-workflows roots, so a break on those roots alone would be green.
- name: PyTest Python API from .wic (corpus round trip)
if: ${{ !cancelled() && steps.setup.outcome == 'success' && steps.corpus.outcome == 'success' }}
run: cd sophios/ && pytest tests/core/test_python_api_from_wic.py
Expand Down
Loading
Loading