-
Notifications
You must be signed in to change notification settings - Fork 0
Add Supabase Docker setup and E2E workflow #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e .[dev,all] | ||
| pip install pytest | ||
| - name: Start Supabase | ||
| run: | | ||
| cp docker/supabase/.env.example docker/supabase/.env | ||
| docker compose -f docker/supabase/docker-compose.yml up -d | ||
| - name: Wait for Supabase API | ||
| run: | | ||
| until curl -s http://localhost:8000/rest/v1/ | grep -q "Unauthorized"; do | ||
| echo 'Waiting for Supabase API...' | ||
| sleep 5 | ||
| done | ||
| until pg_isready -h localhost -p 5432 -U postgres; do | ||
| echo 'Waiting for Supabase DB...' | ||
| sleep 5 | ||
| done | ||
| - name: Run Full Test Suite | ||
| run: | | ||
| pytest tests/core tests/features tests/integration | ||
| - name: Shutdown Supabase | ||
| if: always() | ||
| run: | | ||
| docker compose -f docker/supabase/docker-compose.yml down |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To fix the issue, we need to add a permissions block to the workflow. Since the workflow primarily interacts with repository contents (e.g., checking out code, caching files, and running tests), the minimal required permission is contents: read. This ensures that the GITHUB_TOKEN has only the necessary access to repository contents and no write permissions.
The permissions block should be added at the root level of the workflow file to apply to all jobs, as none of the jobs require additional permissions.
-
Copy modified lines R9-R11
| @@ -8,2 +8,5 @@ | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Summary
Testing
pytest tests/core -m "core and not slow" -qhttps://chatgpt.com/codex/tasks/task_e_6842f77374a88325a8141919f187f9a0