File: test.yml

package info (click to toggle)
sqlite-utils 4.0~a0-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,320 kB
  • sloc: python: 14,310; makefile: 33; ansic: 26; javascript: 21; sh: 5
file content (63 lines) | stat: -rw-r--r-- 1,912 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
name: Test

on: [push, pull_request]

env:
  FORCE_COLOR: 1

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
        numpy: [0, 1]
        os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
        # Skip 3.9 on macos-14 - it only has 3.10+
        exclude:
        - python-version: "3.9"
          os: macos-14
    steps:
    - uses: actions/checkout@v4
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
        allow-prereleases: true
    - uses: actions/cache@v4
      name: Configure pip caching
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    - name: Install dependencies
      run: |
        pip install -e '.[test,mypy,flake8]'
    - name: Optionally install tui dependencies
      run: pip install -e '.[tui]'
    - name: Optionally install numpy
      if: matrix.numpy == 1
      run: pip install numpy
    - name: Install SpatiaLite
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get install libsqlite3-mod-spatialite
    - name: On macOS with Python 3.10 test with sqlean.py
      if: matrix.os == 'macos-latest' && matrix.python-version == '3.10'
      run: pip install sqlean.py sqlite-dump
    - name: Build extension for --load-extension test
      if: matrix.os == 'ubuntu-latest'
      run: |-
        (cd tests && gcc ext.c -fPIC -shared -o ext.so && ls -lah)
    - name: Run tests
      run: |
        pytest -v
    - name: run mypy
      run: mypy sqlite_utils tests
    - name: run flake8
      run: flake8
    - name: Check formatting
      run: black . --check
    - name: Check if cog needs to be run
      run: |
        cog --check README.md docs/*.rst