Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/deploy-dbt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,6 @@ jobs:
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2

- name: Setup Continuous Machine Learning tools
uses: iterative/setup-cml@v2

- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -479,10 +476,15 @@ jobs:

- name: Download latest artifacts from production dbt docs
working-directory: warehouse
run: gsutil cp gs://calitp-dbt-docs/*.json ./target/latest/
run: gsutil cp gs://calitp-dbt-artifacts/latest/*.json ./target/latest/

- name: Setup Continuous Machine Learning tools
uses: iterative/setup-cml@v2

- name: Create CI report
working-directory: warehouse
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: poetry run python scripts/visualize.py ci-report --latest-dir='./target/latest/'

- name: Archive CI report
Expand All @@ -494,7 +496,24 @@ jobs:
warehouse/target/dag.png

- name: Create GitHub comment
id: report-comment
working-directory: warehouse
continue-on-error: true
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cml comment update target/report.md || echo "Failed to generate GitHub comment"
run: cml comment update target/report.md

- uses: peter-evans/find-comment@v3
if: ${{ steps.report-comment.outcome == 'failure' }}
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: "Failed to add ci-report to a comment"

- uses: peter-evans/create-or-update-comment@v4
if: ${{ steps.report-comment.outcome == 'failure' }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.number }}
body: "Failed to add ci-report to a comment. You can download the ci-report in the [Summary](https://github.com/cal-itp/data-infra/actions/runs/${{ github.run_id }})."
edit-mode: replace