File: test-libmaxminddb.yml

package info (click to toggle)
python-maxminddb 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,600 kB
  • sloc: ansic: 7,565; python: 1,711; perl: 987; makefile: 273; sh: 190
file content (71 lines) | stat: -rw-r--r-- 2,108 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Python tests (system libmaxminddb)

on:
  push:
  pull_request:
  schedule:
    - cron: '3 15 * * SUN'

permissions: {}

jobs:
  build:

    strategy:
      matrix:
        env: ["3.10", 3.11, 3.12, 3.13, 3.14]
        # We don't test on Windows currently due to issues
        # build libmaxminddb there.
        os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]

    name: Python ${{ matrix.env }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    env:
      MAXMINDDB_REQUIRE_EXTENSION: 1
      MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB: 1
      MM_FORCE_EXT_TESTS: 1

    steps:
      - uses: actions/checkout@v5
        with:
          submodules: true
          persist-credentials: false

      - name: Install the latest version of uv
        uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # 7.1.0

      - name: Install tox
        run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv --with tox-gh

      - name: Install Python
        if: matrix.env != '3.14'
        run: uv python install --python-preference only-managed ${{ matrix.env }}

      - name: Install libmaxminddb
        run: sudo apt install libmaxminddb-dev
        if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'

      - name: Install libmaxminddb
        run: brew install libmaxminddb
        if: matrix.os == 'macos-latest'

      - name: "Work around macos arm64 homebrew directory changes"
        if: runner.os == 'macOS' && runner.arch == 'ARM64'
        run: |
          echo "CFLAGS=-I/opt/homebrew/include" >> "$GITHUB_ENV"
          echo "LDFLAGS=-L/opt/homebrew/lib" >> "$GITHUB_ENV"

      - name: Build with Werror and Wall
        run: uv build --python ${{ matrix.env }}
        env:
          CFLAGS: "${{ env.CFLAGS }} -Werror -Wall -Wextra"

      - name: Setup test suite
        run: tox run -vv --notest --skip-missing-interpreters false
        env:
          TOX_GH_MAJOR_MINOR: ${{ matrix.env }}

      - name: Run test suite
        run: tox run --skip-pkg-install
        env:
          TOX_GH_MAJOR_MINOR: ${{ matrix.env }}