Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Update python-bsonjs requirement from <0.3,>=0.2 to >=0.2,<0.5 #44

Update python-bsonjs requirement from <0.3,>=0.2 to >=0.2,<0.5

Update python-bsonjs requirement from <0.3,>=0.2 to >=0.2,<0.5 #44

Workflow file for this run

---
name: Tests
on:
pull_request: ~
push:
branches: [ main ]
# Allow job to be triggered manually.
workflow_dispatch:
# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11"]
mongodb-version: ["2", "3", "4", "5", "6", "7"]
# Run auxiliary services. Works for all runner OS, because it is independent.
# https://docs.github.com/en/actions/using-containerized-services/about-service-containers
services:
mongodb:
image: mongo:${{ matrix.mongodb-version }}
ports:
- 27017:27017
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
name: Python ${{ matrix.python-version }}, MongoDB ${{ matrix.mongodb-version }} on OS ${{ matrix.os }}
steps:
- name: Acquire sources
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'setup.py'
- name: Set up project
run: |
# Install package in editable mode.
pip install --use-pep517 --prefer-binary --editable='.[testing]'
- name: Downgrade pymongo on MongoDB 2
if: matrix.mongodb-version == '2'
run: |
pip install 'pymongo<4'
- name: Run linter and software tests
run: |
python -m unittest -vvv