Merge pull request #32 from FalkorDB/fix/discord-link #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| falkordb: | |
| image: falkordb/falkordb:latest | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| strategy: | |
| matrix: | |
| python-version: ['3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install falkordb==1.2.0 pandas==2.3.1 pytest==8.4.1 pytest-cov==6.2.1 coverage==7.10.2 | |
| - name: Wait for FalkorDB to be ready | |
| run: | | |
| for i in {1..30}; do | |
| if redis-cli -h localhost -p 6379 ping; then | |
| echo "FalkorDB is ready" | |
| break | |
| fi | |
| echo "Waiting for FalkorDB..." | |
| sleep 2 | |
| done | |
| - name: Run tests with coverage | |
| run: | | |
| pytest --cov=main --cov-report=xml --cov-report=term-missing test_main.py | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |