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
|
||||
|
||||
build:
|
||||
# supercharge/mongodb-github-action requires containers so we don't test other platforms
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Tests currently only pass on ubuntu on GitHub Actions.
|
||||
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 }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install just
|
||||
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: just install
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
||||
- id: setup-mongodb
|
||||
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||
with:
|
||||
mongodb-version: 6.0
|
||||
version: "${{ matrix.mongodb-version }}"
|
||||
- name: Run tests
|
||||
run: just test
|
||||
run: uv run --extra test pytest -v
|
||||
|
||||
doctest:
|
||||
runs-on: ubuntu-latest
|
||||
@ -92,10 +90,10 @@ jobs:
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: "3.9"
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
||||
- id: setup-mongodb
|
||||
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||
with:
|
||||
mongodb-version: '8.0.0-rc4'
|
||||
version: "8.0"
|
||||
- name: Install dependencies
|
||||
run: just install
|
||||
- name: Run tests
|
||||
@ -210,8 +208,8 @@ jobs:
|
||||
cache-dependency-path: 'sdist/test/pyproject.toml'
|
||||
# Test sdist on lowest supported Python
|
||||
python-version: '3.9'
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
||||
- id: setup-mongodb
|
||||
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||
- name: Run connect test from sdist
|
||||
shell: bash
|
||||
run: |
|
||||
@ -234,10 +232,10 @@ jobs:
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
||||
- id: setup-mongodb
|
||||
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||
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
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
@ -260,10 +258,10 @@ jobs:
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
|
||||
- id: setup-mongodb
|
||||
uses: mongodb-labs/drivers-evergreen-tools@master
|
||||
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
|
||||
- name: Run tests
|
||||
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