PYTHON-5349 Use drivers-evergreen-tools to start servers in GitHub Actions (#2474)
This commit is contained in:
parent
1ffdedc7a4
commit
b83fcbb1a9
40
.github/workflows/test-python.yml
vendored
40
.github/workflows/test-python.yml
vendored
@ -50,33 +50,31 @@ jobs:
|
|||||||
cppcheck pymongo
|
cppcheck pymongo
|
||||||
|
|
||||||
build:
|
build:
|
||||||
# supercharge/mongodb-github-action requires containers so we don't test other platforms
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
# Tests currently only pass on ubuntu on GitHub Actions.
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
python-version: ["3.9", "pypy-3.10", "3.13", "3.13t"]
|
python-version: ["3.9", "pypy-3.10", "3.13t"]
|
||||||
|
mongodb-version: ["8.0"]
|
||||||
|
|
||||||
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
|
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Install just
|
|
||||||
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- id: setup-mongodb
|
||||||
run: just install
|
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||||
- name: Start MongoDB
|
|
||||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
|
||||||
with:
|
with:
|
||||||
mongodb-version: 6.0
|
version: "${{ matrix.mongodb-version }}"
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: just test
|
run: uv run --extra test pytest -v
|
||||||
|
|
||||||
doctest:
|
doctest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -92,10 +90,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
python-version: "3.9"
|
python-version: "3.9"
|
||||||
- name: Start MongoDB
|
- id: setup-mongodb
|
||||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||||
with:
|
with:
|
||||||
mongodb-version: '8.0.0-rc4'
|
version: "8.0"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: just install
|
run: just install
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
@ -210,8 +208,8 @@ jobs:
|
|||||||
cache-dependency-path: 'sdist/test/pyproject.toml'
|
cache-dependency-path: 'sdist/test/pyproject.toml'
|
||||||
# Test sdist on lowest supported Python
|
# Test sdist on lowest supported Python
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
- name: Start MongoDB
|
- id: setup-mongodb
|
||||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||||
- name: Run connect test from sdist
|
- name: Run connect test from sdist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -234,10 +232,10 @@ jobs:
|
|||||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
- name: Start MongoDB
|
- id: setup-mongodb
|
||||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||||
with:
|
with:
|
||||||
mongodb-version: 6.0
|
version: "8.0"
|
||||||
# Async and our test_dns do not support dnspython 1.X, so we don't run async or dns tests here
|
# Async and our test_dns do not support dnspython 1.X, so we don't run async or dns tests here
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -260,10 +258,10 @@ jobs:
|
|||||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
- name: Start MongoDB
|
- id: setup-mongodb
|
||||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||||
with:
|
with:
|
||||||
mongodb-version: 6.0
|
version: "8.0"
|
||||||
# The lifetime kwarg we use in srv resolution was added to the async resolver API in dnspython 2.1.0
|
# The lifetime kwarg we use in srv resolution was added to the async resolver API in dnspython 2.1.0
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
7
.github/zizmor.yml
vendored
Normal file
7
.github/zizmor.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
rules:
|
||||||
|
unpinned-uses:
|
||||||
|
config:
|
||||||
|
policies:
|
||||||
|
actions/*: ref-pin
|
||||||
|
mongodb-labs/drivers-github-tools/*: ref-pin
|
||||||
|
mongodb-labs/drivers-evergreen-tools: ref-pin
|
||||||
Loading…
Reference in New Issue
Block a user