[MNT] remove dead legacy module workflow (#629)
          
            #2674
        
      
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Test | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'docs/**' | |
| branches: | |
| - main | |
| - 'release**' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'release**' | |
| paths-ignore: | |
| - 'docs/**' | |
| types: [opened, synchronize] | |
| # Allows workflows to be manually triggered | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| # Needed for the 'trilom/file-changes-action' action | |
| pull-requests: read | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| code-quality: | |
| name: code-quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: repository checkout step | |
| uses: actions/checkout@v5 | |
| - name: python environment step | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: install pre-commit | |
| run: python3 -m pip install pre-commit | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed files | |
| id: changed-files | |
| run: | | |
| CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | tr '\n' ' ') | |
| echo "CHANGED_FILES=${CHANGED_FILES}" >> $GITHUB_ENV | |
| - name: Print changed files | |
| run: | | |
| echo "Changed files: $CHANGED_FILES" | |
| - name: Run pre-commit on changed files | |
| run: | | |
| if [ -n "$CHANGED_FILES" ]; then | |
| pre-commit run --color always --files $CHANGED_FILES --show-diff-on-failure | |
| else | |
| echo "No changed files to check." | |
| fi | |
| - name: check missing __init__ files | |
| run: build_tools/fail_on_missing_init_files.sh | |
| shell: bash | |
| run-notebook-examples: | |
| needs: code-quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.9 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install .[all_extras,binder,dev] | |
| - name: Run example notebooks | |
| run: build_tools/run_examples.sh | |
| shell: bash | |
| detect-changed-classes: | |
| needs: code-quality | |
| runs-on: ubuntu-latest | |
| outputs: | |
| obj_list: ${{ steps.get-change-list.outputs.obj_list }} | |
| obj_list_length: ${{ steps.get-change-list.outputs.obj_list_length }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: git remote set-branches origin 'main' | |
| - run: git fetch --depth 1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install skpro with dev dependencies | |
| run: pip install .[dev] | |
| env: | |
| UV_SYSTEM_PYTHON: 1 | |
| - name: Get list of names of changed classes | |
| id: get-change-list | |
| run: | | |
| OBJ_LIST=$(python -c 'from skpro.tests.test_switch import _get_all_changed_classes; import json; obj_list = _get_all_changed_classes(vm=True); print(json.dumps(obj_list))') | |
| OBJ_LIST_LENGTH=$(python -c 'from skpro.tests.test_switch import _get_all_changed_classes; obj_list = _get_all_changed_classes(vm=True); print(len(obj_list))') | |
| echo "OBJ_LIST=$OBJ_LIST" >> $GITHUB_ENV | |
| echo "OBJ_LIST_LENGTH=$OBJ_LIST_LENGTH" >> $GITHUB_ENV | |
| echo "obj_list=$OBJ_LIST" >> $GITHUB_OUTPUT | |
| echo "obj_list_length=$OBJ_LIST_LENGTH" >> $GITHUB_OUTPUT | |
| - name: Print changed classes | |
| run: | | |
| echo "Number of changed classes: $OBJ_LIST_LENGTH" | |
| echo "Changed classes: $OBJ_LIST" | |
| run-tests-no-extras: | |
| needs: code-quality | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: git remote set-branches origin 'main' | |
| - run: git fetch --depth 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Install skpro and dependencies | |
| run: | | |
| python -m pip install .[dev] --no-cache-dir | |
| - name: Show dependencies | |
| run: python -m pip list | |
| - name: Show available branches | |
| run: git branch -a | |
| - name: Run tests | |
| run: make test | |
| - name: Publish code coverage | |
| uses: codecov/codecov-action@v5 | |
| run-tests-all-extras: | |
| needs: code-quality | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: git remote set-branches origin 'main' | |
| - run: git fetch --depth 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Install skpro and dependencies | |
| run: | | |
| python -m pip install .[all_extras,dev] --no-cache-dir | |
| - name: Show dependencies | |
| run: python -m pip list | |
| - name: Show available branches | |
| run: git branch -a | |
| - name: Run tests | |
| run: make test | |
| - name: Publish code coverage | |
| uses: codecov/codecov-action@v5 | |
| test-est: | |
| needs: detect-changed-classes | |
| if: ${{ needs.detect-changed-classes.outputs.obj_list != '[]' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| flag: ${{ fromJson(needs.detect-changed-classes.outputs.obj_list) }} | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Force non-GUI Matplotlib backend (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| shell: pwsh | |
| run: echo "MPLBACKEND=Agg" >> $env:GITHUB_ENV | |
| - name: Install skpro with dev dependencies | |
| run: uv pip install .[dev] | |
| env: | |
| UV_SYSTEM_PYTHON: 1 | |
| - name: Install dependencies for ${{ matrix.flag }} | |
| run: | | |
| python -c "from skpro.registry import deps; print('\n'.join(deps('${{ matrix.flag }}')))" > deps.txt | |
| pip install -r deps.txt | |
| continue-on-error: true | |
| - name: Show dependencies | |
| run: uv pip list | |
| - name: Run tests with ${{ matrix.flag }} | |
| env: | |
| FLAG: ${{ matrix.flag }} | |
| shell: bash | |
| run: python -c "from skpro.tests._test_vm import run_test_vm; run_test_vm('${{ matrix.flag }}')" |