Profile Pic Upload Routes #1890
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: Python tests | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| test_db: | |
| image: neo4j:5.23-community | |
| env: | |
| NEO4J_AUTH: neo4j/test_pwd | |
| ports: | |
| - 7688:7687 | |
| options: >- | |
| --health-cmd "cypher-shell -u neo4j -p test_pwd 'RETURN 1'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Python 3.13 Setup | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.13 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install python3-dev libpq-dev | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements/dev_unix.txt | |
| - name: Seed Neo4j Test DB | |
| shell: bash | |
| run: | | |
| CONTAINER_ID=$(docker ps \ | |
| --filter ancestor=neo4j:5.23-community \ | |
| --format "{{.ID}}") | |
| until docker exec $CONTAINER_ID \ | |
| bin/cypher-shell -u neo4j -p test_pwd "RETURN 1"; do | |
| echo "Waiting for Neo4j to wake up…" | |
| sleep 1 | |
| done | |
| docker exec $CONTAINER_ID \ | |
| bin/cypher-shell -u neo4j -p test_pwd \ | |
| "MERGE (n:TestMarker {name:'TEST_DATABASE'});" | |
| - name: Check style | |
| run: flake8 backend/ | |
| - name: Run tests | |
| run: python -m pytest | |
| env: | |
| GRAPH_USER: neo4j | |
| GRAPH_PASSWORD: test_pwd | |
| GRAPH_TEST_URI: localhost:7688 | |
| MIXPANEL_TOKEN: mixpanel_token | |
| - name: Output Neo4j logs | |
| if: failure() | |
| run: docker logs $(docker ps -q --filter ancestor=neo4j:5.23-community) |