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

Internal: Update continuous integration server integration #1627

Merged
merged 27 commits into from
Mar 22, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4b7555e
Update workflow abstract
caendesilva Mar 22, 2024
07c9525
Add step identifier
caendesilva Mar 22, 2024
b729277
Continue on error
caendesilva Mar 22, 2024
b9fd9b7
Ping server only on step success
caendesilva Mar 22, 2024
7b0cc35
Force fail test to debug workflow
caendesilva Mar 22, 2024
2633237
Revert "Force fail test to debug workflow"
caendesilva Mar 22, 2024
2111571
Revert "Ping server only on step success"
caendesilva Mar 22, 2024
0707f02
Revert "Continue on error"
caendesilva Mar 22, 2024
3831299
Add new sample step for status check
caendesilva Mar 22, 2024
3115e2b
Always run step
caendesilva Mar 22, 2024
342bba1
Revert "Revert "Force fail test to debug workflow""
caendesilva Mar 22, 2024
15f56a6
Revert "Revert "Revert "Force fail test to debug workflow"""
caendesilva Mar 22, 2024
41a0574
Ping continuous integration server with test status
caendesilva Mar 22, 2024
f1862cc
Accept JSON response
caendesilva Mar 22, 2024
1fa9685
Post JSON directly
caendesilva Mar 22, 2024
7baf309
Cleanup and formatting
caendesilva Mar 22, 2024
7914114
Add spacing
caendesilva Mar 22, 2024
2a9f918
Revert "Revert "Force fail test to debug workflow""
caendesilva Mar 22, 2024
5ae5aef
Revert "Revert "Revert "Force fail test to debug workflow"""
caendesilva Mar 22, 2024
33f13ac
Get the real commit hash
caendesilva Mar 22, 2024
caf4d53
Revert "Revert "Revert "Revert "Force fail test to debug workflow""""
caendesilva Mar 22, 2024
0034b80
Revert "Revert "Revert "Revert "Revert "Force fail test to debug work…
caendesilva Mar 22, 2024
a7f87e2
Fix outcome conditional
caendesilva Mar 22, 2024
07de33c
Formatting
caendesilva Mar 22, 2024
5ae48e2
Force fail test to debug workflow
caendesilva Mar 22, 2024
6a62df6
Revert "Force fail test to debug workflow"
caendesilva Mar 22, 2024
462658e
Pass the link to the workflow run
caendesilva Mar 22, 2024
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
25 changes: 24 additions & 1 deletion .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# This workflow is especially helpful for pull requests to quickly see if the other tests will definitely fail
# This workflow is especially helpful for pull requests to quickly see if the other tests will definitely fail.
# In order to get even quicker feedback, we also ping our Continuous Integration server to get a status check
# as soon as we know the outcome, as the GitHub Actions Pull Request UI takes a little bit to update.

name: 🔥 Smoke Tests

Expand All @@ -25,8 +27,29 @@ jobs:
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Run smoke tests
id: smoke-tests
run: vendor/bin/pest --stop-on-failure --log-junit report.xml

- name: Ping continuous integration server with test status
if: always()
run: |
bearerToken="${{ secrets.CI_SERVER_TOKEN }}"
commit="${{ github.event.pull_request.head.sha }}"
url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

if [ ${{ steps.smoke-tests.outcome }} == "failure" ]; then
status=false
else
status=true
fi

curl -X POST --fail-with-body \
-H "Authorization: Bearer $bearerToken" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"commit":"'"$commit"'", "status":'$status', "url":"'"$url"'"}' \
https://ci.hydephp.com/api/test-run-reports

- name: Ping statistics server with test results
run: |
curl https://github.com/raw/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
Expand Down
Loading