upate: lib version #8
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
| # .github/workflows/test.yml | |
| name: Run Python Tests | |
| # Controls when the action will run | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] # Run on pushes to main and develop | |
| pull_request: | |
| branches: [ "main" ] # Run on pull requests targeting main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest # Use the latest Linux environment | |
| strategy: | |
| matrix: | |
| # Test against multiple Python versions | |
| python-version: ["3.8", "3.9", "3.10", "3.11"] | |
| steps: | |
| # 1. Check out the repository code | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| # 2. Set up the specific version of Python | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # 3. Install dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install the package itself in editable mode | |
| # and include the 'test' dependencies (pytest) | |
| pip install -e .[test] | |
| # 4. Run tests | |
| - name: Run tests with pytest | |
| run: | | |
| pytest |