Skip to content

Commit

Permalink
Change to upload the state to the recce cloud
Browse files Browse the repository at this point in the history
Signed-off-by: popcorny <[email protected]>
  • Loading branch information
popcornylu committed Jun 17, 2024
1 parent 213e6d7 commit 572803b
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/recce-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,23 @@ env:

jobs:
check-pull-request:
permissions:
contents: write
name: Check pull request by Recce CI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: checks
run: |
git remote -v
git branch --show-current
echo $GITHUB_TOKEN | base64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -35,7 +47,8 @@ jobs:
poetry run which dbt
- name: Install Recce
run: poetry run pip install recce-nightly
# run: poetry run pip install recce-nightly
run: poetry run pip install git+https://github.com/DataRecce/recce.git@bug/fetch_repo_in_the_cloud_mode

- name: Add packages.yml file
run: |
Expand Down Expand Up @@ -67,20 +80,13 @@ jobs:
DBT_CURRENT_TARGET: "dev"

- name: Run Recce CI
run: poetry run recce run

- name: Archive Recce State File
uses: actions/upload-artifact@v4
id: recce-artifact-uploader
with:
name: recce-state-file
path: recce_state.json
run: poetry run recce run --cloud --cloud-token ${{ secrets.RECCE_CLOUD_TOKEN }}

- name: Prepare Recce Summary
id: recce-summary
run: |
source $(poetry env info --path)/bin/activate
recce summary recce_state.json > recce_summary.md
recce summary --cloud --cloud-token ${{ secrets.RECCE_CLOUD_TOKEN }} > recce_summary.md
cat recce_summary.md >> $GITHUB_STEP_SUMMARY
echo '${{ env.NEXT_STEP_MESSAGE }}' >> recce_summary.md
Expand All @@ -96,15 +102,15 @@ jobs:
ARTIFACT_URL: ${{ steps.recce-artifact-uploader.outputs.artifact-url }}
NEXT_STEP_MESSAGE: |
## Next Steps
If you want to check more detail inforamtion about the recce result, please download the [artifact](${{ steps.recce-artifact-uploader.outputs.artifact-url }}) file and open it by [Recce](https://pypi.org/project/recce/) CLI.
If you want to check more detail information about the recce result, please download the [artifact](${{ steps.recce-artifact-uploader.outputs.artifact-url }}) file and open it by [Recce](https://pypi.org/project/recce/) CLI.
### How to check the recce result
```bash
# Unzip the downloaded artifact file
tar -xf recce-state-file.zip
# Launch the recce server based on the state file
recce server --review recce_state.json
recce server --review --cloud
# Open the recce server http://localhost:8000 by your browser
```
Expand Down

0 comments on commit 572803b

Please sign in to comment.