Add version_persistent dependency guard and GH Actions test for ver…
#1736
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 pip installation for mlc-script | |
| on: | |
| pull_request: | |
| branches: [ "main", "dev" ] | |
| paths: | |
| - '.github/workflows/test-mlc-script-pip.yml' | |
| - '**' | |
| - '!**.md' | |
| jobs: | |
| test_mlc_script_install_pypi: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.8"] | |
| os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
| exclude: | |
| - os: windows-latest | |
| - os: macos-latest | |
| steps: | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: install mlc-scripts | |
| run: | | |
| pip install mlc-scripts | |
| - name: run detect-os script | |
| run: | | |
| mlcr detect-os -j | |
| test_mlc_script_install_pull_request_source: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.8"] | |
| os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
| exclude: | |
| - os: windows-latest | |
| - os: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: install mlc-scripts from source repo | |
| run: | | |
| pip install . | |
| - name: run detect-os script | |
| run: | | |
| mlcr detect-os -j |