Skip to content

Update to Mongo 7, mongoengine 0.29, and pymongo 4.6 #1369

Update to Mongo 7, mongoengine 0.29, and pymongo 4.6

Update to Mongo 7, mongoengine 0.29, and pymongo 4.6 #1369

Workflow file for this run

---
# This Test workflow uses pants
name: Test
on:
push:
branches:
# only on merges to master branch
- master
# and version branches, which only include minor versions (eg: v3.4)
- v[0-9]+.[0-9]+
tags:
# also version tags, which include bugfix releases (eg: v3.4.0)
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
type: [opened, reopened, edited]
branches:
# Only for PRs targeting those branches
- master
- v[0-9]+.[0-9]+
#schedule:
# # run every night at midnight
# - cron: '0 0 * * *'
jobs:
test:
name: '${{ matrix.name }} - Python ${{ matrix.python-version-short }}'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# NOTE: We need to use full Python version as part of Python deps cache key otherwise
# setup virtualenv step will fail.
include:
- name: 'Test (pants runs: pytest)'
python-version-short: '3.8'
python-version: '3.8.10'
- name: 'Test (pants runs: pytest)'
python-version-short: '3.9'
python-version: '3.9.14'
services:
mongo:
image: mongo:7.0
ports:
- 27017:27017
rabbitmq:
image: rabbitmq:3.8-management
options: >-
--name rabbitmq
ports:
- 5671:5671/tcp # AMQP SSL port
- 5672:5672/tcp # AMQP standard port
- 15672:15672/tcp # Management: HTTP, CLI
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--name "redis"
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379/tcp
env:
COLUMNS: '120'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# a test uses a submodule, and pants needs access to it to calculate deps.
submodules: 'true'
- name: 'Set up Python (${{ matrix.python-version }})'
uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Cache and Install APT Dependencies
uses: ./.github/actions/apt-packages
- name: Initialize Pants and its GHA caches
uses: ./.github/actions/init-pants
with:
# To ignore a bad cache, bump the cache* integer.
gha-cache-key: cache0-py${{ matrix.python-version }}
- name: Test
env:
# Github Actions uses the 'runner' user, so use that instead of stanley.
ST2TESTS_SYSTEM_USER: 'runner'
# We do not support running pytest everywhere yet. When we do it will be simply:
# pants test ::
# Until then, we need to manually adjust this command line to test what we can.
run: |
pants test pylint_plugins/:: pants-plugins/::
- name: Upload pants log
uses: actions/upload-artifact@v4
with:
name: pants-log-py${{ matrix.python-version }}
path: .pants.d/pants.log
if: always() # We want the log even on failures.