Skip to content

Nightly pipeline e2e tests on featurenet #116

Nightly pipeline e2e tests on featurenet

Nightly pipeline e2e tests on featurenet #116

---
name: Nightly pipeline e2e tests on featurenet
on:
workflow_dispatch:
schedule:
- cron: '00 23 * * *'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: false
jobs:
check-vars-and-secrets:
name: Check vars and secrets
uses: ./.github/workflows/_check-vars-and-secrets.yml
secrets: inherit
build-aleph-e2e-client-image:
needs: [check-vars-and-secrets]
name: Build aleph-e2e-client image
uses: ./.github/workflows/_build-aleph-e2e-client-image.yml
with:
ref: ${{ github.ref }}
push: true
secrets: inherit
get-full-docker-image-path:
name: Get full aleph-node full docker path path
needs: [check-vars-and-secrets]
runs-on: ubuntu-20.04
outputs:
fqdn-image: ${{ steps.get-aleph-node-fqdn-image.outputs.fqdn-image }}
ref: ${{ steps.get-aleph-node-fqdn-image.outputs.ref }}
image-exists: ${{ steps.get-aleph-node-fqdn-image.outputs.image-exists }}
steps:
- name: Get aleph-node fqdn path from ${{ github.ref }}
id: get-aleph-node-fqdn-image
uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6
with:
ref: ${{ github.ref }}
test-binary: 'false'
ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }}
ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }}
build-and-push-featurenet-node-image:
needs: [get-full-docker-image-path]
if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }}
name: Build and push PR test docker image from ${{ github.ref }}
uses: ./.github/workflows/_build-and-push-featurenet-node-image.yml
with:
ref: ${{ needs.get-full-docker-image-path.outputs.ref }}
fqdn-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }}
short-session: false
secrets: inherit
create-featurenet:
needs:
- get-full-docker-image-path
- build-and-push-featurenet-node-image
# to prevent this job to be skipped when on of the parent jobs is skipped
if: ${{ !cancelled() }}
name: Create featurenet from ${{ github.ref }}
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v6
secrets: inherit
with:
featurenet-name: 'ops-finalization-e2e'
aleph-node-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }}
validators: '6'
expiration: '3h'
internal: true
delete-first: true
runs-finalization-e2e-test-on-fe:
needs:
- create-featurenet
- build-aleph-e2e-client-image
name: Runs finalization e2e on FE
env:
# yamllint disable-line rule:line-length
ALEPH_E2E_CLIENT_IMAGE: '${{ needs.build-aleph-e2e-client-image.outputs.aleph-e2e-client-image }}'
runs-on: [self-hosted, Linux, X64, small]
steps:
- name: Download aleph-e2e-client artifact
uses: actions/download-artifact@v3
with:
name: aleph-e2e-client
- name: Load test suite docker image
shell: bash
run: docker load -i aleph-e2e-client.tar
- name: Run e2e test
shell: bash
run: |
docker run --network host \
-e NODE_URL='wss://${{ needs.create-featurenet.outputs.ws-hostname }}:443' \
-e TEST_CASES='finalization::finalization' \
-e RUST_LOG=info \
'${{ env.ALEPH_E2E_CLIENT_IMAGE }}'
timeout-minutes: 15
delete-featurenet:
if: ${{ always() }}
needs:
- runs-finalization-e2e-test-on-fe
name: Delete featurenet
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v5
secrets: inherit
with:
featurenet-name: 'ops-finalization-e2e'
slack-notification:
name: Slack notification
runs-on: ubuntu-20.04
needs: [delete-featurenet]
if: >
!cancelled() &&
github.event_name != 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Send Slack message
uses: ./.github/actions/slack-notification
with:
notify-on: "failure"
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }}