Skip to content

Commit

Permalink
Add request to set status after integration results commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeake committed Jan 16, 2024
1 parent 7aeb10d commit d033169
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ jobs:
mv memory_log_${step}.txt ./tests/integration_testing/results/
done
else
python tests/integration_testing/run_workflow.py
# python tests/integration_testing/run_workflow.py
echo -e "\nnew line" >> tests/integration_testing/results/agg_results.json
fi
mv ./results/*.json ./tests/integration_testing/results/
# mv ./results/*.json ./tests/integration_testing/results/
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -77,6 +78,23 @@ jobs:
git commit -m "Upload results files from CI build"
echo "Pushing to branch: $branch_name"
git push -u origin $branch_name
# Set status checks to success
checks=("code-quality-checks" "python-tests (3.8)" "python-tests (3.9)" "python-tests (3.10)")
commit_sha=$(git rev-parse HEAD)
status_url="https://api.github.com/repos/${{ github.repository }}/statuses/$commit_sha"
for check in "${checks[@]}"; do
curl -L \
-X POST \
$status_url \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-d '{
"state": "success",
"context": "'"${check}"'",
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'
done
fi
stop-runner:
Expand Down

0 comments on commit d033169

Please sign in to comment.