Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sha and commit status #171

Merged
merged 1 commit into from
Aug 9, 2024
Merged
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
17 changes: 13 additions & 4 deletions .github/workflows/end2end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,28 @@ jobs:
source .venv/bin/activate
cd tests
if pytest -s test_branch_model.py --cloud_dir ${{ github.event.inputs.cloud_dir }} --model_name ${{ github.event.inputs.model_name }}; then
TEST_CONCLUSION=success
echo "Tests passed, Pushing Branch if needed"
cd ..
git add -u
if git status --porcelain | grep -q '^M'; then
echo "Files are modified - updating branch"
git commit -m "update O2K --model_name ${{ github.event.inputs.model_name }} --cloud_dir ${{ github.event.inputs.cloud_dir }}"
git commit -m "update O2K --model_name ${{ github.event.inputs.model_name }} --cloud_dir ${{ github.event.inputs.cloud_dir }} --sha $GITHUB_SHA"
git push origin "$BRANCH"
else
echo "No changes were made to leap-model-parser - not pushing the branch"
fi
else
TEST_CONCLUSION=failure
echo "Tests Failed, check pytest output"
fi
rm -rf /home/runner/work/leap_parser_tests_copy


echo "TEST_CONCLUSION=$TEST_CONCLUSION" >> $GITHUB_ENV
- name: add commit status
id: commit_status
run: |
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.TENSORLEAP_OPS_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/tensorleap/onnx2keras/statuses/$GITHUB_SHA \
-d '{"state":"'${TEST_CONCLUSION}'","target_url":"https://github.com/'${GITHUB_REPOSITORY}'/actions/runs/'${GITHUB_RUN_ID}'","description":"Leap model parser dynamic test result","context":"end2end/parser-dynamic-test"}'
Loading