chore: Remove UP045 from ruff ignore list #77
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| test: | |
| name: Pytest - Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: Set up Python | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Cache libpostal | |
| id: cache-libpostal | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local | |
| key: libpostal-${{ runner.os }}-v1.0.0 | |
| - name: Install libpostal from source | |
| if: steps.cache-libpostal.outputs.cache-hit != 'true' | |
| run: | | |
| set -eux | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential curl automake autoconf libtool pkg-config git | |
| git clone https://github.com/openvenues/libpostal.git /tmp/libpostal | |
| cd /tmp/libpostal | |
| ./bootstrap.sh | |
| ./configure --prefix="$HOME/.local" --datadir="$HOME/.local/share/libpostal" | |
| make | |
| make install | |
| - name: Setup libpostal environment | |
| run: | | |
| # Export paths so subsequent steps can find libpostal | |
| echo "LIBPOSTAL_DATA_DIR=$HOME/.local/share/libpostal" >> "$GITHUB_ENV" | |
| echo "LD_LIBRARY_PATH=$HOME/.local/lib:${LD_LIBRARY_PATH:-}" >> "$GITHUB_ENV" | |
| echo "PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:${PKG_CONFIG_PATH:-}" >> "$GITHUB_ENV" | |
| echo "CPATH=$HOME/.local/include:${CPATH:-}" >> "$GITHUB_ENV" | |
| - name: Install dependencies | |
| run: uv sync --group dev --all-extras | |
| - name: Run tests | |
| run: uv run pytest tests/ --cov --junitxml=junit.xml -o junit_family=legacy --cov=src/ryandata_address_utils --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |