name: Python Tests on: push: pull_request: jobs: build: # supercharge/mongodb-github-action requires containers so we don't test other platforms runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04] python-version: ["3.6", "3.10", "pypy-3.8"] 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 }} - name: Start MongoDB uses: supercharge/mongodb-github-action@1.7.0 with: mongodb-version: 4.4 - name: Run tests run: | python setup.py test mypytest: name: Run mypy runs-on: ubuntu-latest strategy: matrix: python-version: ['3.7', '3.10'] fail-fast: false steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install -U pip mypy pip install -e ".[zstd, srv]" - name: Run mypy run: | mypy --install-types --non-interactive bson gridfs tools pymongo mypy --install-types --non-interactive --disable-error-code var-annotated --disable-error-code attr-defined --disable-error-code union-attr --disable-error-code assignment --disable-error-code no-redef --disable-error-code index test