Add gha #1
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 and Linting | |
on: | |
push: | |
branches: | |
- main: | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
mongodb-version: ["3.6"] | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Run Linter | |
run: tox -e lint virtual_resources/ | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@1.10.0 | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: Run Tests | |
run: tox -e pytest virtual_resources/ |