Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7362e71
feat: Add bulk operations and view management for NocoDB
karlspace Sep 1, 2025
6a4336b
feat: Add comprehensive tests for NocoDB webhooks functionality
karlspace Sep 1, 2025
433c9c5
feat: Add comprehensive tests for NocoDB webhooks functionality
karlspace Sep 1, 2025
28030a9
style: Füge Emojis zu den Jobnamen und Schritten in der Feature-Test-…
karlspace Sep 1, 2025
6193afd
feat: Add python-dotenv to development dependencies and improve Bandi…
karlspace Sep 1, 2025
a506140
feat: Add Docker support for testing NocoDB Simple Client and enhance…
karlspace Sep 2, 2025
458853e
feat: Enhance GitHub Actions workflow with descriptive step names and…
karlspace Sep 2, 2025
c4b6f73
feat: Refactor async client tests to use NocoDBConfig for configurati…
karlspace Sep 2, 2025
2114ad2
style: Aktualisiere Workflow-Datei mit klaren Jobnamen für Tests und …
karlspace Sep 2, 2025
9f0bf0e
feat: Füge Unterstützung für asynchrone Tests mit pytest-asyncio hinzu
karlspace Sep 2, 2025
c24c622
feat: Verbessere Typüberprüfungen und Fehlerbehandlung in der NocoDB-…
karlspace Sep 2, 2025
532ae91
feat: Verbessere Fehlerbehandlung und Unterstützung für neue Cache-Ko…
karlspace Sep 2, 2025
cb8a663
feat: Reduziere die maximale Dateigröße auf 50MB im FileManager
karlspace Sep 2, 2025
9b63ba0
feat: Entferne die Standardgröße für die maximale Dateigröße im FileM…
karlspace Sep 2, 2025
f500885
docs: add openapi specs.
karlspace Sep 2, 2025
1957546
feat: Füge NocoDBMetaClient hinzu und verbessere Tests für asynchrone…
karlspace Sep 2, 2025
908581d
feat: Aktualisiere NocoDBMetaClient zur Vererbung von NocoDBClient un…
karlspace Sep 2, 2025
336cd2b
feat: Entferne Docker-Testskripte und zugehörige Docker-Konfiguration
karlspace Sep 2, 2025
d37bcf3
feat: Aktualisiere Pre-Commit-Konfiguration, um Tests von Hooks auszu…
karlspace Sep 2, 2025
8204b1d
Remove test suite for webhooks functionality, including all related t…
karlspace Sep 2, 2025
3856392
feat: Aktualisiere Tests für NocoDBTable, um spezifische Argumente fü…
karlspace Sep 2, 2025
22a7afa
feat: Add unit tests for NocoDB Views and Webhooks functionality
karlspace Sep 2, 2025
f21fe5a
refactor: Optimize webhook tests by simplifying assertions and updati…
karlspace Sep 3, 2025
0afa9fe
feat: Refactor tests and add new test cases for NocoDB Meta Client an…
karlspace Sep 3, 2025
591836b
feat: Füge Unterstützung für workflow_dispatch und workflow_call in d…
karlspace Sep 3, 2025
9a2df88
fix: Refactor and enhance view management tests
karlspace Sep 3, 2025
04e6fa8
fix: Update repository links in CONTRIBUTING.md and pyproject.toml fo…
karlspace Sep 17, 2025
7ce9aaa
feat: Integrationstests für Python-managed NocoDB-Instanz optimiert u…
karlspace Oct 8, 2025
7aaebf4
fix: Entferne ungenutzte Importe aus den Integrationstests
karlspace Oct 8, 2025
b7220c4
fix: Entferne Docker SDK und Pillow Installation aus den Workflow-Sch…
karlspace Oct 8, 2025
de35dcb
fix: Überprüfe die Verfügbarkeit von Docker anstelle der Einrichtung …
karlspace Oct 8, 2025
10fc739
fix: Verbessere Container-Start- und Bereitstellungslogik für Integra…
karlspace Oct 8, 2025
181bafd
fix: Aktualisiere die Logik zum Abrufen vorhandener Basen in den Inte…
karlspace Oct 8, 2025
931b6a3
fix: Aktualisiere die Logik zur Entdeckung von Basen in den Integrati…
karlspace Oct 8, 2025
8315d7a
feat: add workspace and base management methods to NocoDBMetaClient
karlspace Oct 8, 2025
e719e21
feat: implement workspace and base operations tests in NocoDBMetaClient
karlspace Oct 8, 2025
080a2b9
feat: aktualisiere die list_bases-Methode zur Auflistung aller Basen …
karlspace Oct 9, 2025
61bcb50
Refactor code structure for improved readability and maintainability
karlspace Oct 9, 2025
a07f13b
Implement new feature for user authentication and improve error handling
karlspace Oct 9, 2025
05448a5
feat: füge Integrationstests für nocodb-simple-client hinzu
karlspace Oct 9, 2025
187cf39
feat: erweitere Integrationstests um dynamische Tabellenverwaltung un…
karlspace Oct 9, 2025
7747ae2
feat: verbessere Docker-Setup und Warte-Logik für NocoDB-Container
karlspace Oct 9, 2025
d369f4c
feat: verbessere Integrationstests mit Konfigurationsüberprüfung und …
karlspace Oct 9, 2025
4a80d2b
feat: verbessere Fehlerbehandlung und Debugging für Token-Generierung…
karlspace Oct 9, 2025
2f9b022
feat: verbessere Token-Generierung mit Basis-Authentifizierung und ve…
karlspace Oct 9, 2025
c12dbfc
fix: behebe Syntaxfehler bei der Token-Generierung
karlspace Oct 9, 2025
2b647d7
fix: entferne überflüssige Parameter bei der Token-Generierung
karlspace Oct 9, 2025
a700c42
fix: entferne fehlerhafte API-Token-Generierung und verbessere Fehler…
karlspace Oct 9, 2025
ed5786b
feat: verbessere Token-Generierung durch Authentifizierung und verbes…
karlspace Oct 9, 2025
34bc6d4
chore: entferne veraltete README-Datei für CI/CD-Setup
karlspace Oct 9, 2025
e0dc9f9
feat: aktualisiere Token-Generierung und verbessere Umgebungsdateien …
karlspace Oct 9, 2025
1ad9718
feat: verbessere Konfigurationsladefunktion und unterstütze neue Umge…
karlspace Oct 9, 2025
877edcb
feat: aktualisiere Konfigurationsladefunktion zur Unterstützung von n…
karlspace Oct 9, 2025
6a3e298
feat: aktualisiere Konfiguration und Umgebungsvariablen für nocodb-co…
karlspace Oct 9, 2025
491942e
feat: erweitere NocoDB Gesundheitsprüfung um Authentifizierungs-API-Ü…
karlspace Oct 9, 2025
5af424a
feat: vereinheitliche Variablennamen in Integrationstests für NocoDB-…
karlspace Oct 9, 2025
23ae951
feat: entferne überflüssige ID-Spalte aus der Tabellendefinition in I…
karlspace Oct 9, 2025
5b1f592
feat: verbessere Fehlerbehandlung in Integrationstests für nicht vorh…
karlspace Oct 9, 2025
d758cf1
feat: verbessere Fehlerbehandlung bei der Einfügeoperation für NocoDB…
karlspace Oct 9, 2025
6d54860
feat: aktualisiere NocoDB-Client und Tests für API v2 Array-Antworten…
karlspace Oct 9, 2025
11edc03
feat: verbessere Fehlerbehandlung in NocoDB-Client und Integrationste…
karlspace Oct 9, 2025
fcb9940
feat: entferne veraltete Analyse der API-Antwortformate aus der Dokum…
karlspace Oct 9, 2025
67ae670
feat: aktualisiere NocoDB-Client und Tests für API v2, um die Rückgab…
karlspace Oct 9, 2025
a328535
feat: verbessere Protokollierung in den Integrationstests und aktuali…
karlspace Oct 9, 2025
9cf5d8b
feat: aktualisiere Test für Dateioperationen, um Upload und Download …
karlspace Oct 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# GitHub Actions Workflows

This directory contains the CI/CD workflows for the NocoDB Simple Client project.

## Workflows Overview

### 1. `python-automatic-release.yml`
**Purpose**: Automated releases on main branch
**Trigger**: Push to `main` branch
**Tests**: Unit tests only (fast, no external dependencies)
**Dependencies**: None (uses mocks)

### 2. `feature-test.yml`
**Purpose**: Comprehensive testing on feature branches
**Trigger**: Push to `feature-*` branches
**Tests**: Unit tests + Integration tests with live NocoDB
**Dependencies**: Automatic NocoDB setup with SQLite

## Workflow Details

### Release Workflow (`python-automatic-release.yml`)
- **Fast execution** (~2-3 minutes)
- **No external dependencies**
- **All Python versions** (3.8-3.12)
- **Unit tests only** via `--ci` flag
- **Automatic versioning** and PyPI publishing

### Feature Testing Workflow (`feature-test.yml`)

#### Job 1: Unit Tests
- **Matrix**: Python 3.9, 3.11, 3.12
- **Duration**: ~2-4 minutes
- **Dependencies**: None (mocked)
- **Purpose**: Fast feedback on basic functionality

#### Job 2: Integration Tests
- **Setup**: Automatic NocoDB instance with SQLite
- **User Creation**: Automated admin user setup
- **API Token**: Dynamic token generation
- **Tests**: Full integration test suite
- **Duration**: ~8-12 minutes
- **Environment Variables**: Automatically configured

#### Job 3: Performance Tests (Optional)
- **Trigger**: PR label `test-performance`
- **Setup**: Optimized NocoDB instance
- **Tests**: Performance benchmarks
- **Reduced Dataset**: CI-appropriate test sizes

## NocoDB Setup Process

The feature workflow automatically:

1. **Starts NocoDB Container**:
```bash
docker run -d --name nocodb-test \
-p 8080:8080 \
-e NC_DB="sqlite3://data/nc.db" \
-e NC_AUTH_JWT_SECRET="test-jwt-secret-$(date +%s)" \
-e NC_DISABLE_TELE=true \
nocodb/nocodb:latest
```

2. **Creates Admin User**:
```bash
curl -X POST /api/v1/auth/user/signup \
-d '{"email":"test@example.com","password":"TestPassword123!"}'
```

3. **Gets API Token**:
```bash
curl -X POST /api/v1/auth/user/signin \
-d '{"email":"test@example.com","password":"TestPassword123!"}'
```

4. **Configures Environment**:
```bash
NOCODB_BASE_URL=http://localhost:8080
NOCODB_TOKEN=$TOKEN
TEST_TABLE_PREFIX=gh_test_
MAX_FILE_SIZE_MB=1
```

## Environment Configuration

### Automatic Environment Variables
The workflow automatically configures:

| Variable | Value | Description |
|----------|-------|-------------|
| `NOCODB_BASE_URL` | `http://localhost:8080` | NocoDB instance URL |
| `NOCODB_TOKEN` | `${{ steps.setup-nocodb.outputs.token }}` | Dynamic API token |
| `TEST_TABLE_PREFIX` | `gh_test_` | Prefix for test tables |
| `CLEANUP_TEST_DATA` | `true` | Auto-cleanup enabled |
| `RUN_INTEGRATION_TESTS` | `true` | Enable integration tests |
| `TEST_TIMEOUT` | `60` | Extended timeout for CI |
| `MAX_FILE_SIZE_MB` | `1` | File upload limit |
| `PERFORMANCE_TEST_RECORDS` | `50` | Reduced for CI speed |
| `BULK_TEST_BATCH_SIZE` | `10` | Small batches for CI |

### Error Handling & Debugging

#### Automatic Debugging on Failure:
```bash
# Show NocoDB logs
docker logs nocodb-test

# Show container status
docker ps -a

# Test API connectivity
curl -v http://localhost:8080/api/v1/health
```

#### Cleanup on Success/Failure:
```bash
docker stop nocodb-test || true
docker rm nocodb-test || true
rm -rf ./nocodb-data || true
```

## Usage Examples

### Triggering Feature Tests
```bash
# Push to feature branch triggers automatic testing
git checkout -b feature/new-functionality
git push origin feature/new-functionality
```

### Adding Performance Tests
```bash
# Add label to PR to trigger performance tests
gh pr edit --add-label "test-performance"
```

### Local Testing Equivalent
```bash
# Same tests locally
python scripts/run-all.py --integration # Integration tests
python scripts/run-all.py --performance # Performance tests
python scripts/run-all.py --all-tests # Everything
```

## Troubleshooting

### Common Issues

1. **NocoDB startup timeout**:
- Increased timeout to 120s
- Multiple health check methods
- Fallback token generation

2. **API token extraction failure**:
- Multiple extraction methods
- Fallback token generation
- Graceful error handling

3. **Test data conflicts**:
- Unique table prefixes (`gh_test_`, `perf_test_`)
- Automatic cleanup
- Isolated containers per job

### Debug Steps

1. **Check workflow logs** in GitHub Actions
2. **Review NocoDB container logs** (shown on failure)
3. **Test API endpoints manually** using curl commands
4. **Run locally** with same environment variables

## Performance Considerations

### Optimizations Applied:
- **Reduced Python matrix** for feature tests (3 versions vs 5)
- **SQLite database** (faster than PostgreSQL/MySQL)
- **Disabled telemetry** (`NC_DISABLE_TELE=true`)
- **Reduced test datasets** for CI environment
- **Parallel job execution** where possible
- **Efficient cleanup** to minimize resource usage

### Expected Durations:
- **Unit tests**: 2-4 minutes per Python version
- **Integration tests**: 8-12 minutes total
- **Performance tests**: 10-15 minutes (when enabled)
- **Total feature workflow**: ~15-20 minutes
182 changes: 182 additions & 0 deletions .github/workflows/feature-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: 🧪 Feature Integration Tests

on:
push:
branches: [ feature-* ]
pull_request:
branches: [ feature-* ]

workflow_dispatch:

workflow_call:

jobs:
# 🔬 Unit tests on multiple Python versions (fast)
unit-tests:
name: 🧪 Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"] # Use Python 3.12 for tests

steps:
- name: 📥 Checkout code
uses: actions/checkout@v4

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: 📦 Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-

- name: ⚙️ Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ".[dev]"

- name: 🧪 Run unit tests
run: |
python scripts/run-all.py --ci
env:
PYTHONPATH: ${{ github.workspace }}/src

# 🔗 Integration tests with Python-managed NocoDB instance
integration-test:
name: 🔗 Integration Tests (Python-Managed)
runs-on: ubuntu-latest
needs: unit-tests

steps:
- name: 📥 Checkout code
uses: actions/checkout@v4

- name: 🐍 Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: ⚙️ Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ".[dev]"

- name: 🐳 Setup NocoDB Container
run: |
# Make script executable
chmod +x scripts/ci-setup.sh

# Run setup script
CONTAINER_NAME=nocodb-integration-test \
NOCODB_PORT=8080 \
NC_ADMIN_EMAIL=test@integration.local \
NC_ADMIN_PASSWORD=IntegrationTest123 \
./scripts/ci-setup.sh setup

# Verify that config files were created
echo "=== Checking generated config files ==="
ls -la nocodb-config.json .env.test 2>/dev/null || echo "Config files not found!"

# Show config content (without sensitive data in logs)
if [ -f nocodb-config.json ]; then
echo "✅ nocodb-config.json created"
cat nocodb-config.json | jq 'del(.NOCODB_TOKEN)' || cat nocodb-config.json
fi

- name: 🔗 Run integration tests
run: |
# Verify config files are available
if [ ! -f nocodb-config.json ]; then
echo "❌ ERROR: nocodb-config.json not found!"
exit 1
fi

# Run tests with config file
python -m pytest tests/test_integration.py -v --tb=short
env:
PYTHONPATH: ${{ github.workspace }}/src
SKIP_INTEGRATION: 0
# Test configuration
TEST_TIMEOUT: 300
MAX_FILE_SIZE_MB: 1
CLEANUP_TEST_DATA: true

- name: 🔍 Show Docker logs on failure
if: failure()
run: |
echo "=== Available Docker containers ==="
docker ps -a
echo "=== Docker system info ==="
docker system df
echo "=== Check for NocoDB container logs ==="
docker logs nocodb-integration-test 2>/dev/null || echo "Container not found or no logs"

- name: 🧹 Cleanup Docker containers
if: always()
run: |
# Use cleanup script
chmod +x scripts/ci-setup.sh
CONTAINER_NAME=nocodb-integration-test ./scripts/ci-setup.sh cleanup

# ⚡ Optional performance tests (when PR has performance label)
performance-test:
name: ⚡ Performance Tests (Python-managed)
runs-on: ubuntu-latest
needs: unit-tests
if: contains(github.event.pull_request.labels.*.name, 'test-performance')

steps:
- name: 📥 Checkout code
uses: actions/checkout@v4

- name: 🐍 Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: ⚙️ Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ".[dev]"

- name: 🐳 Setup NocoDB Container
run: |
# Make script executable
chmod +x scripts/ci-setup.sh

# Run setup script with performance test configuration
CONTAINER_NAME=nocodb-integration-test \
NOCODB_PORT=8080 \
NC_ADMIN_EMAIL=test@integration.local \
NC_ADMIN_PASSWORD=IntegrationTest123 \
./scripts/ci-setup.sh setup
env:
PYTHONPATH: ${{ github.workspace }}/src

- name: ⚡ Run Python-managed performance tests
run: |
python -m pytest tests/test_integration.py::TestIntegration::test_bulk_operations -v --tb=short
python -m pytest tests/test_performance.py -v --tb=short 2>/dev/null || echo "Performance tests not available"
env:
PYTHONPATH: ${{ github.workspace }}/src
SKIP_INTEGRATION: 0
# Performance test configuration
PERFORMANCE_TEST_RECORDS: 100
BULK_TEST_BATCH_SIZE: 20
TEST_TIMEOUT: 600

- name: 🧹 Cleanup performance test containers
if: always()
run: |
# Use cleanup script
chmod +x scripts/ci-setup.sh
CONTAINER_NAME=nocodb-integration-test ./scripts/ci-setup.sh cleanup
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ marimo/_static/
marimo/_lsp/
__marimo__/

# Tools
.benchmarks/

# IDE
.vscode/
.claude/
Expand Down
Loading
Loading