Bump version to 2.2.2 #58
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: Unit Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| - name: Configure Poetry | |
| run: | | |
| poetry config virtualenvs.create true | |
| poetry config virtualenvs.in-project true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-root | |
| - name: Install project | |
| run: poetry install --no-interaction | |
| - name: Run unit tests for all commands | |
| run: | | |
| poetry run pytest tests/ -v --cov=chipfoundry_cli --cov-report=term-missing --cov-report=json --cov-report=html | |
| - name: Upload coverage to GitHub | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: htmlcov/ | |
| retention-days: 30 | |
| - name: Generate coverage summary | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| echo "## Coverage Summary (${{ matrix.os }}, Python ${{ matrix.python-version }})" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| poetry run pytest tests/ --cov=chipfoundry_cli --cov-report=term --quiet 2>&1 | grep -A 10 "TOTAL" >> $GITHUB_STEP_SUMMARY || echo "Coverage: See artifacts for detailed report" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |