Skip to content

e2e

e2e #70

Workflow file for this run

on:
workflow_dispatch: {}
name: e2e
env:
REGISTRY: ghcr.io
TARGET_IMAGE: ghcr.io/txpipe/oura-e2e:${{ github.sha }}
CLUSTER: m1-prod-6x3kk4
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ env.TARGET_IMAGE }}
prepare:
needs: ["build"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-west-2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ClusterAdminRole
role-session-name: Github-e2e-Rollout
role-duration-seconds: 1200
- uses: azure/[email protected]
with:
version: "v1.23.6"
- name: Login to EKS
run: aws eks update-kubeconfig --name ${CLUSTER}
- name: Create Namespace
run: kubectl create namespace e2e-${GITHUB_RUN_NUMBER}
- name: Create Service Account
working-directory: .github/e2e
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
run: envsubst < serviceaccount.yaml | kubectl apply -n e2e-${GITHUB_RUN_NUMBER} -f -
test:
needs: ["prepare"]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: assert-n2c-preview-origin-blocks
- name: assert-n2c-preview-tip-blocks
- name: assert-n2n-mainnet-origin-blocks
- name: assert-n2n-mainnet-tip-blocks
- name: assert-n2n-preview-origin-blocks
- name: assert-n2n-preview-tip-blocks
- name: aws-lambda-10-blocks
- name: aws-s3-500-blocks
- name: aws-sqs-10-blocks
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-west-2
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ClusterAdminRole
role-session-name: Github-e2e-Rollout
role-duration-seconds: 3600
- uses: azure/[email protected]
with:
version: "v1.23.6"
- name: Login to EKS
run: aws eks update-kubeconfig --name ${CLUSTER}
- name: Rollout Job
working-directory: .github/e2e
env:
TEST_NAME: ${{ matrix.name }}
run: |+
envsubst < ${TEST_NAME}.yaml | kubectl apply -n e2e-${GITHUB_RUN_NUMBER} -f -
- name: Wait for Completion
env:
TEST_NAME: ${{ matrix.name }}
run: |+
kubectl wait --for=condition=complete --timeout=1800s job ${TEST_NAME} -n e2e-${GITHUB_RUN_NUMBER}
kubectl get job ${TEST_NAME} -o jsonpath={.status.succeeded} -n e2e-${GITHUB_RUN_NUMBER}