Skip to content

MOTOR-1109 Switch to Supported Build Hosts #314

MOTOR-1109 Switch to Supported Build Hosts

MOTOR-1109 Switch to Supported Build Hosts #314

Workflow file for this run

name: Python Tests
on:
push:
pull_request:
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
with:
extra_args: --all-files --hook-stage=manual
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.7", "3.11"]
fail-fast: false
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'setup.py'
- name: Start MongoDB with Custom Options
run: |
mkdir data
mongod --fork --dbpath=$(pwd)/data --logpath=$PWD/mongo.log --setParameter enableTestCommands=1
- name: Install Python dependencies
run: |
python -m pip install -U pip tox tox-gh-actions setuptools
- name: Run tests
run: |
tox
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
cache: 'pip'
cache-dependency-path: 'setup.py'
- name: Start MongoDB with Custom Options
run: |
mkdir data
mongod --fork --dbpath=$(pwd)/data --logpath=$PWD/mongo.log --setParameter enableTestCommands=1
- name: Install Python dependencies
run: |
python -m pip install -U pip tox
- name: Run docs
run: |
tox -e py3-sphinx-docs
tox -e py3-sphinx-doctest
tox -e py3-sphinx-linkcheck