Skip to content

Test google-github-action/auth #1

Test google-github-action/auth

Test google-github-action/auth #1

Workflow file for this run

name: Recce with dbt cloud
on:
pull_request:
branches: [main]
jobs:
check-pull-request:
name: Prepare for Recce
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Trigger the dbt cloud job and fetch artifacts for Recce
uses: datarecce/dbt-cloud-action@main
id: recce_dbt_cloud_run
with:
dbt_cloud_token: ${{ secrets.DBT_CLOUD_API_TOKEN }}
dbt_cloud_account_id: 62083
dbt_cloud_base_job_id: 747906
dbt_cloud_current_job_id: 747907
failure_on_error: true
- uses: 'google-github-actions/auth@v2'
id: google-auth
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY_JSON }}
- name: test step
run: |
echo "${{ steps.google-auth.outputs.project_id }}"
echo "${{ steps.google-auth.outputs.credentials_file_path }}"
# - name: Run Recce in cloud mode
# env:
# SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
# SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
# SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
# SNOWFLAKE_SCHEMA: "PR_${{ github.event.pull_request.number }}"
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# RECCE_STATE_PASSWORD: ${{ secrets.RECCE_STATE_PASSWORD }}
# run: recce run --cloud
# - name: Prepare Recce Summary
# id: recce-summary
# env:
# SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
# SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
# SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
# SNOWFLAKE_SCHEMA: "PR_${{ github.event.pull_request.number }}"
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# RECCE_STATE_PASSWORD: ${{ secrets.RECCE_STATE_PASSWORD }}
# run: |
# set -eo pipefail
# recce summary --cloud > recce_summary.md
# # Add next steps message
# cat << EOF >> recce_summary.md
# ## Next Steps
# To view detailed Recce results:
# 1. Checkout the PR branch: \`git checkout ${{ github.event.pull_request.head.ref }}\`
# 2. Launch the Recce server: \`recce server --review --cloud\`
# 3. Open http://localhost:8000 in your browser
# EOF
# # Truncate summary if it exceeds GitHub's comment size limit
# if [[ $(wc -c < recce_summary.md) -ge 65535 ]]; then
# truncate -s 65000 recce_summary.md
# echo "
# ... (Summary truncated due to size limit)
#
# For the full summary, please check the Job Summary page: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
# " >> recce_summary.md
# fi
# - name: Comment on pull request
# uses: thollander/actions-comment-pull-request@v2
# with:
# filePath: recce_summary.md
# comment_tag: recce