fix: Replace my own lru_cache implementation with async_lru (#97) #124
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: ci | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - '[0-9]+.[0-9]+' | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+*' | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| merge_group: | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| - "3.14t" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout the source tree | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Test with pytest | |
| timeout-minutes: 3 | |
| run: | | |
| uv run pytest -v --cov=src --cov-report=xml tests | |
| - name: Send code coverage report | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| env_vars: GHA_OS,GHA_PYTHON | |
| required-checks: | |
| if: always() | |
| 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) }} | |
| deploy-to-pypi: | |
| needs: [required-checks] | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| environment: deploy-to-pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout the source tree | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: uv sync --locked --all-extras --dev | |
| - name: Build sdist and wheel | |
| run: uv build | |
| - name: Publish | |
| uses: pypa/gh-action-pypi-publish@release/v1 |