-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crib ccip integration-tests workflow
- Loading branch information
1 parent
6f04719
commit 15e832d
Showing
4 changed files
with
36 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,15 @@ on: | |
pull_request: | ||
paths: | ||
- ".github/workflows/crib-ccip-v2-integration-test.yml" | ||
schedule: | ||
- cron: "0 1 * * *" | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
@@ -17,98 +21,28 @@ jobs: | |
contents: read | ||
actions: read | ||
steps: | ||
- name: Prevent running on draft PRs | ||
id: check-prereqs-for-running | ||
run: | | ||
should_run=true | ||
if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.pull_request.draft }}" == "true" ]; then | ||
should_run=false | ||
fi | ||
echo "should_run=$should_run" >> "$GITHUB_OUTPUT" | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
persist-credentials: false | ||
|
||
- name: Setup GitHub token using GATI | ||
id: token | ||
uses: smartcontractkit/.github/actions/setup-github-token@c0b38e6c40d72d01b8d2f24f92623a2538b3dedb # main | ||
- name: Run CRIB Integration Tests for CCIP | ||
uses: ./.github/actions/crib | ||
with: | ||
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
aws-role-duration-seconds: "1800" | ||
- name: Debug workspace dir | ||
shell: bash | ||
run: | | ||
echo ${{ github.workspace }} | ||
echo $GITHUB_WORKSPACE | ||
- name: Deploy and validate CRIB Environment for CCIP v2 | ||
# if: steps.check-prereqs-for-running.outputs.should_run == 'true' | ||
uses: smartcontractkit/.github/actions/crib-deploy-environment@57f99fbea73056c490c766d50ef582a13ec4f3bb # [email protected] | ||
id: deploy-crib | ||
with: | ||
github-token: ${{ steps.token.outputs.access-token }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_STAGE }} | ||
aws-ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
ingress-base-domain: ${{ secrets.INGRESS_BASE_DOMAIN_STAGE }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
api-gw-host-crib: ${{ secrets.AWS_API_GW_HOST_CRIB_STAGE }} | ||
api-gw-host-k8s: ${{ secrets.AWS_API_GW_HOST_K8S_STAGE }} | ||
k8s-cluster-name: ${{ secrets.AWS_K8S_CLUSTER_NAME_STAGE }} | ||
command: "deploy-geth" | ||
aws-token-issuer-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-token-issuer-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }} | ||
ingress-base-domain: ${{ secrets.INGRESS_BASE_DOMAIN_STAGE }} | ||
k8s-staging-ingress-suffix: ${{ secrets.K8S_STAGING_INGRESS_SUFFIX }} | ||
gap-url-integration-tests: ${{ secrets.GAP_URL }} | ||
crib-product-dir: 'ccip-v2' | ||
crib-command: 'ccip-v2-infra' | ||
crib-alert-slack-webhook: ${{ secrets.CRIB_ALERT_SLACK_WEBHOOK }} | ||
product-image: ${{ secrets.AWS_SDLC_ECR_HOSTNAME }}/ccip | ||
product-image-tag: develop | ||
product-dir: 'ccip-v2' | ||
chainlink-team: ccip | ||
chainlink-product: ccip | ||
k8s-api-endpoint: ${{ secrets.K8S_API_ENDPOINT_STAGE }} | ||
crib-repo-ref: 'crib-352/rpc-type' | ||
- name: Get GH JWT Token | ||
id: get-jwt-token | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const audience = 'gap'; | ||
const id_token = await core.getIDToken(audience); | ||
if (!id_token) { | ||
throw new Error("Failed to retrieve the JWT token"); | ||
} | ||
return id_token | ||
- name: Test ws connection | ||
env: | ||
GETH_WS_ENDPOINT: wss://gap-${{ steps.deploy-crib.outputs.devspace-namespace }}-geth-1337-ws.public.main.stage.cldev.sh | ||
shell: bash | ||
run: | | ||
set -xeuo pipefail | ||
npm install -g wscat | ||
echo "checking ws conection via gap" | ||
wscat --no-check -c "${GETH_WS_ENDPOINT}" \ | ||
--header "x-authorization-github-jwt: Bearer ${{ steps.get-jwt-token.outputs.result }}" \ | ||
-x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | ||
echo "finished checking ws conection via gap" | ||
# - uses: actions/[email protected] | ||
# - name: Set up Go | ||
# uses: ./.github/actions/setup-go | ||
# with: | ||
# go-version-file: 'go.mod' | ||
# - name: Run CRIB integration test | ||
# working-directory: integration-tests/crib | ||
# env: | ||
# K8S_STAGING_INGRESS_SUFFIX: ${{ secrets.K8S_STAGING_INGRESS_SUFFIX }} | ||
# CRIB_NAMESPACE: ${{ steps.deploy-crib.outputs.devspace-namespace }} | ||
# GAP_URL: ${{ secrets.GAP_URL }} | ||
# run: |- | ||
# # go test -v -run TestSomething | ||
# echo "running tests here" | ||
# - name: Destroy CRIB Environment | ||
# id: destroy | ||
# if: always() && steps.deploy-crib.outputs.devspace-namespace != '' | ||
# uses: smartcontractkit/.github/actions/crib-purge-environment@c0b38e6c40d72d01b8d2f24f92623a2538b3dedb # [email protected] | ||
# with: | ||
# namespace: ${{ steps.deploy-crib.outputs.devspace-namespace }} | ||
crib-chainlink-docker-image-name: ${{ secrets.AWS_SDLC_ECR_HOSTNAME }}/ccip | ||
crib-chainlink-docker-image-tag: develop | ||
main-dns-zone: ${{ secrets.MAIN_DNS_ZONE_PUBLIC_STAGE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters