ENH: Decouple Sentry fetch and MongoDB storage + CI workflow #1
Workflow file for this run
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: Sentry fetch preview | |
| on: | |
| pull_request: | |
| jobs: | |
| fetch-preview: | |
| runs-on: ubuntu-latest | |
| env: | |
| SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Fetch previous day and print dataframe preview | |
| run: | | |
| START_TIME=$(date -u -d "yesterday 00:00:00" +%Y-%m-%dT%H:%M:%S) | |
| END_TIME=$(date -u -d "today 00:00:00" +%Y-%m-%dT%H:%M:%S) | |
| python src/run.py get \ | |
| --event started \ | |
| --start-time "${START_TIME}" \ | |
| --end-time "${END_TIME}" \ | |
| --no-store \ | |
| --print-dataframe |