-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 855 Bytes
/
test.yml
File metadata and controls
30 lines (30 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Unit tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
MONGODB_URI: mongodb://localhost:27017
jobs:
test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up python version ${{ matrix.python-version }} for testing
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install python test dependencies
run: |
pip install .[test]
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.12.0
with:
mongodb-version: latest
- name: Test with pytest
run: |
pytest ./test/