File: test-python.yml

package info (click to toggle)
libmongocrypt 1.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,572 kB
  • sloc: ansic: 70,067; python: 4,547; cpp: 615; sh: 460; makefile: 44; awk: 8
file content (65 lines) | stat: -rw-r--r-- 1,673 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
name: Python Tests

on: 
  push:
  pull_request:
    paths:
      - bindings/python/*
      - bindings/python/**/*.py
      - .github/workflows/*python.yml

concurrency:
  group: python-test-${{ github.ref }}
  cancel-in-progress: true

defaults:
  run:
    working-directory: ./bindings/python
    shell: bash -eux {0}
 
jobs:

  static:
    if: github.repository_owner == 'mongodb'
    runs-on: ubuntu-latest
    steps:
     - uses: actions/checkout@v5
       with:
        persist-credentials: false
     - uses: actions/setup-python@v6
     - name: "Run pre-commit"
       working-directory: .
       run: |
         pip install -U -q pre-commit
         pre-commit run --all-files --hook-stage manual
     - run: |
        pip install check-manifest
        check-manifest -v

  build:
    if: github.repository_owner == 'mongodb'
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.9", "3.13", "3.14"]

    steps:
      - uses: actions/checkout@v5
        with:
          fetch-depth: 0
          persist-credentials: false
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          allow-prereleases: true
          python-version: ${{ matrix.python-version }}
      - name: Build and test dist files
        run: |
          if [ "${{ matrix.python-version }}" == "3.14" ]; then 
            export PIP_PRE=1
          fi
          export LIBMONGOCRYPT_VERSION=$(cat ./scripts/libmongocrypt-version.txt)
          git fetch origin $LIBMONGOCRYPT_VERSION
          bash ./scripts/release.sh