-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (57 loc) · 1.74 KB
/
python-ci.yml
File metadata and controls
59 lines (57 loc) · 1.74 KB
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
54
55
56
57
58
59
name: Python CI
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
build:
name: "Python ${{ matrix.python-version }} ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
activate-environment: 'foo'
- name: Install dependencies
run: |
conda install pip
pip install -r requirements-dev.txt
- name: Build with maturin
run: |
maturin develop --release
- name: Lint with flake8
run: |
python -m flake8 python tests
continue-on-error: true
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.12.1
with:
mongodb-version: "4.4"
mongodb-replica-set: rs1
mongodb-port: 27117
- name: Run tests
# run: python -m pytest tests
# run: python -m pytest tests --cov=./python/mongojet --cov-report term-missing -s
run: python -m pytest tests --cov=./python/mongojet --cov-report xml
- name: Upload coverage
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: romis2012/mongojet
file: ./coverage.xml
flags: unit
fail_ci_if_error: false