MemoryStore: replace mongomock with pymongo-inmemory #1804
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: testing | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/CHANGELOG.md' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- name: Run pre-commit | |
run: | | |
pip install pre-commit | |
pre-commit run | |
test: | |
needs: lint | |
services: | |
local_mongodb: | |
image: mongo:4.0 | |
ports: | |
- 27017:27017 | |
azurite: | |
image: mcr.microsoft.com/azure-storage/azurite | |
ports: | |
- 10000:10000 | |
strategy: | |
max-parallel: 6 | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.7","3.8", "3.9", "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-testing.txt | |
pip install -r requirements-optional.txt | |
- name: Test with pytest | |
env: | |
CONTINUOUS_INTEGRATION: True | |
MONGODB_SRV_URI: ${{ secrets.MONGODB_SRV_URI }} | |
PYMONGOIM__OPERATING_SYSTEM: ubuntu | |
PYMONGOIM__MONGO_VERSION: 6.0 | |
run: | | |
pip install -e . | |
pytest --cov=maggma --cov-report=xml | |
- uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e . | |
pip install -r requirements-optional.txt | |
pip install -r requirements-docs.txt | |
- name: Build | |
run: mkdocs build |