-
Notifications
You must be signed in to change notification settings - Fork 102
53 lines (50 loc) · 1.94 KB
/
txmongo.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: TxMongo
on: [push]
jobs:
basic:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.11', '3.12']
mongodb-version: ['3.6', '4.2', '4.4']
steps:
- uses: actions/checkout@v4
- name: Start MongoDB on port 27017
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Run basic tests in tox
run: tox -f py${{ matrix.python-version }} basic
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: code-coverage-report-${{ matrix.mongodb-version }}-${{ matrix.python-version }}
path: htmlcov
advanced:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.11', '3.12']
mongodb-version: ['4.2', '4.4']
steps:
- uses: actions/checkout@v4
- name: Install MongoDB ${{ matrix.mongodb-version }}
run: |
wget -qO - https://www.mongodb.org/static/pgp/server-${{ matrix.mongodb-version }}.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/${{ matrix.mongodb-version }} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-${{ matrix.mongodb-version }}.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades mongodb-org-server
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox and any other packages
run: pip install tox
- name: Run advanced tests in tox
run: tox -f py${{ matrix.python-version }} advanced