Skip to content

Commit

Permalink
Merge pull request #1627 from hydephp/update-ci-server-integrations
Browse files Browse the repository at this point in the history
Internal: Update continuous integration server integration
  • Loading branch information
caendesilva committed Mar 22, 2024
2 parents 72e1e25 + 462658e commit 4338f79
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/smoke-tests.yml
@@ -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://raw.githubusercontent.com/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
Expand Down

0 comments on commit 4338f79

Please sign in to comment.