restructure to allow passing of mongo connection object #92
This file contains hidden or 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
| # Built from: | |
| # https://docs.github.com/en/actions/guides/building-and-testing-python | |
| # https://github.com/snok/install-poetry#workflows-and-tips | |
| name: Build and test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install tox | |
| run: pipx install tox | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: lint | |
| run: make lint | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ '3.9', '3.10', '3.11', '3.12' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ts-graphviz/setup-graphviz@v2 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'poetry' | |
| - name: Install dependencies | |
| run: poetry install --all-extras | |
| - name: Run test suite | |
| run: make test |