-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (49 loc) · 1.62 KB
/
ci.yml
File metadata and controls
52 lines (49 loc) · 1.62 KB
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
name: CI
on:
push:
branches: [ "master", "ci/*" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
name: test py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache-dependency-path: tests/clients/go/go.sum
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 22
cache: maven
cache-dependency-path: tests/clients/java/pom.xml
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python
run: uv python install ${{ matrix.python-version }}
- name: Install libmaxminddb from source
run: |
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool
git clone --depth 1 https://github.com/maxmind/libmaxminddb.git /tmp/libmaxminddb
cd /tmp/libmaxminddb
./bootstrap && ./configure && make -j$(nproc) && sudo make install
sudo ldconfig
- name: Test
run: uv run --python ${{ matrix.python-version }} --extra test pytest
- name: Lint
if: matrix.python-version == '3.13'
run: |
uv run --python ${{ matrix.python-version }} --extra dev ruff check --no-fix
uv run --python ${{ matrix.python-version }} --extra dev ruff format --check