🧪 tests: update utils test. #55
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/**' | |
| - '*.md' | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| id: setup_python | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: .venv | |
| key: ${{ runner.os }}-python-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}-test | |
| - name: Install Python Dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| uv venv | |
| uv pip install -U pip | |
| uv pip install -e . | |
| uv pip install -U pytest | |
| - name: Use Python virtual environment | |
| run: | | |
| echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH | |
| echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV | |
| - name: Check git is working | |
| run: | | |
| git config --global user.email "korawica@github.actions" | |
| git config --global user.name "Testing Git on Testing CI" | |
| git --version | |
| git config --list | |
| - name: Test with Pytest | |
| run: | | |
| pytest -vv |