1- name : Health-check Dry Run
1+ name : Dry Run Collect and Summarize
22on :
3- workflow_dispatch :
4- inputs :
5- slack_channel :
6- description : Slack channel to post the error message to if the builds fail.
7- required : false
8- default : " sdv-alerts-debug"
93 pull_request :
104 types :
115 - opened
@@ -19,17 +13,18 @@ jobs:
1913 runs-on : ubuntu-latest
2014 steps :
2115 - uses : actions/checkout@v4
22- - name : Set up Python ${{ matrix.python-version }}
23- uses : actions /setup-python@v5
16+ - name : Install uv
17+ uses : astral-sh /setup-uv@v6
2418 with :
25- python-version : ' 3.13'
26- - name : Install dependencies
19+ enable-cache : true
20+ activate-environment : true
21+ - name : Install pip and dependencies
2722 run : |
28- python -m pip install --upgrade pip
29- python -m pip install .
30- - name : Collect Downloads Data
23+ uv pip install -U pip
24+ uv pip install .
25+ - name : Collect Downloads Data - Dry Run
3126 run : |
32- download-analytics collect \
27+ uv run download-analytics collect \
3328 --verbose \
3429 --max-days 30 \
3530 --add-metrics \
@@ -38,22 +33,11 @@ jobs:
3833 env :
3934 PYDRIVE_CREDENTIALS : ${{ secrets.PYDRIVE_CREDENTIALS }}
4035 BIGQUERY_CREDENTIALS : ${{ secrets.BIGQUERY_CREDENTIALS }}
41-
42- alert :
43- needs : [dry_run]
44- runs-on : ubuntu-latest
45- if : failure()
46- steps :
47- - uses : actions/checkout@v4
48- - uses : actions/setup-python@v5
49- with :
50- python-version : ' 3.13'
51- - name : Install slack dependencies
36+ - name : Run Summarize - Dry Run
5237 run : |
53- python -m pip install --upgrade pip
54- python -m pip install invoke
55- python -m pip install .[dev]
56- - name : Slack alert if failure
57- run : python -m download_analytics.slack_utils -r ${{ github.run_id }} -c ${{ github.event.inputs.slack_channel || 'sdv-alerts' }}
38+ uv run download-analytics summarize \
39+ --verbose \
40+ --output-folder gdrive://10QHbqyvptmZX4yhu2Y38YJbVHqINRr0n \
41+ --dry-run
5842 env :
59- SLACK_TOKEN : ${{ secrets.SLACK_TOKEN }}
43+ PYDRIVE_CREDENTIALS : ${{ secrets.PYDRIVE_CREDENTIALS }}
0 commit comments