This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
README: Add migration notice about CrateDB Toolkit #54
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: 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: | |
lint: | |
name: Run black/pylint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run black | |
uses: psf/black@stable | |
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 software tests | |
run: | | |
python -m unittest -vvv |