-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (55 loc) · 1.52 KB
/
tests.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
54
55
56
57
58
59
60
61
62
63
64
65
name: Tests
on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.rst'
- 'docs/**'
pull_request:
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.rst'
- 'docs/**'
jobs:
integration-tests:
name: Integration Tests
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Start MinIO server
run: |
docker compose -f tests/docker/docker-compose.yml up -d
# Wait for MinIO to be healthy
sleep 10
- name: Set up development environment
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install maturin pytest pytest-cov pytest-asyncio
- name: Build Rust extensions
run: |
source .venv/bin/activate
maturin develop -m crates/service-memory/Cargo.toml
maturin develop -m crates/service-s3/Cargo.toml
- name: Install package with test dependencies
run: |
source .venv/bin/activate
pip install -e ".[test]"
- name: Run test suite
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
run: |
source .venv/bin/activate
pytest -v --cov=opendalfs --cov-report=xml
- name: Cleanup MinIO server
if: always()
run: docker compose -f tests/docker/docker-compose.yml down