feat(ci): implement active checks for previews readiness (#3949)
This commit is contained in:
parent
f364dabe2f
commit
348c61530e
32
.github/workflows/ci-cd-trigger.yml
vendored
32
.github/workflows/ci-cd-trigger.yml
vendored
@ -171,6 +171,7 @@ jobs:
|
|||||||
- publish-dist
|
- publish-dist
|
||||||
- lint-test-build
|
- lint-test-build
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
timeout-minutes: 60
|
||||||
name: '(CD) comment preview links'
|
name: '(CD) comment preview links'
|
||||||
steps:
|
steps:
|
||||||
- name: Find Comment
|
- name: Find Comment
|
||||||
@ -180,6 +181,29 @@ jobs:
|
|||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
body-includes: Previews
|
body-includes: Previews
|
||||||
|
|
||||||
|
- name: Wait for deployments
|
||||||
|
run: |
|
||||||
|
# https://stackoverflow.com/questions/3183444/check-for-valid-link-url
|
||||||
|
regex='(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]'
|
||||||
|
if [[ "${{ needs.lint-test-build.outputs.preview_governance }}" =~ $regex ]]; then
|
||||||
|
until curl -L --fail "${{ needs.lint-test-build.outputs.preview_governance }}"; do
|
||||||
|
echo "waiting for governance preview"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [[ "${{ needs.lint-test-build.outputs.preview_explorer }}" =~ $regex ]]; then
|
||||||
|
until curl -L --fail "${{ needs.lint-test-build.outputs.preview_explorer }}"; do
|
||||||
|
echo "waiting for explorer preview"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [[ "${{ needs.lint-test-build.outputs.preview_trading }}" =~ $regex ]]; then
|
||||||
|
until curl -L --fail "${{ needs.lint-test-build.outputs.preview_trading }}"; do
|
||||||
|
echo "waiting for trading preview"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
uses: peter-evans/create-or-update-comment@v3
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
if: ${{ steps.fc.outputs.comment-id == 0 }}
|
if: ${{ steps.fc.outputs.comment-id == 0 }}
|
||||||
@ -191,15 +215,9 @@ jobs:
|
|||||||
* explorer: ${{ needs.lint-test-build.outputs.preview_explorer }}
|
* explorer: ${{ needs.lint-test-build.outputs.preview_explorer }}
|
||||||
* trading: ${{ needs.lint-test-build.outputs.preview_trading }}
|
* trading: ${{ needs.lint-test-build.outputs.preview_trading }}
|
||||||
|
|
||||||
|
# Report single result at the end, to avoid mess with required checks in PR
|
||||||
cypress-check:
|
cypress-check:
|
||||||
name: '(CI) cypress - check'
|
name: '(CI) cypress - check'
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: cypress
|
|
||||||
steps:
|
|
||||||
- run: echo Done!
|
|
||||||
|
|
||||||
# Report single result at the end, to avoid mess with required checks in PR
|
|
||||||
cypress-result:
|
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs: cypress
|
needs: cypress
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
Loading…
Reference in New Issue
Block a user