Merge pull request #293 from cmake-wheel/dependabot/pip/mdit-py-plugi… #958
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 editable with example | |
| on: | |
| push: | |
| branches: | |
| - cmeel | |
| pull_request: | |
| branches: | |
| - cmeel | |
| jobs: | |
| test: | |
| name: Editable ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os}} | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest"] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| env: | |
| SYSTEM_VERSION_COMPAT: 0 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: setup | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install -U wheel | |
| - name: build cmeel wheel | |
| run: python -m pip wheel -w $HOME/wh . | |
| - name: install cmeel | |
| run: python -m pip install $HOME/wh/cmeel*.whl | |
| - name: clone cmeel-example | |
| run: git clone --recursive -j2 https://github.com/cmake-wheel/cmeel-example | |
| - name: install cmeel-example in editable mode | |
| run: cd cmeel-example && python -m pip install --editable . | |
| - name: test module | |
| run: python -c "import cmeel_example; assert cmeel_example.cmeel_add(3, 4) == 7" | |
| - name: update source | |
| run: echo "def incr_add(a, b):return cmeel_add(a, b) + 1" >> cmeel-example/python/cmeel_example/__init__.py | |
| - name: test updated module | |
| run: python -c "import cmeel_example; assert cmeel_example.incr_add(3, 4) == 8" | |
| check: | |
| if: always() | |
| name: check-macos-linux-editable | |
| needs: | |
| - test | |
| runs-on: Ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |