-
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.
* decouple CRIB vars * move CRIB vars to CTF, connect with GAP * bump deps * finalize deps * update go.mod * Spin up a separate GAP for crib and k8s * Change up the ports since 8080 is expected for CRIB connections * Use released version of setup-gap action * increase timeout * less logs * increase timeout * increase timeout even more * try creds for one hour * run without chaos * again * try to spin up CRIB * use GATI * update GATI secrets * use different port * fix working dir * update ref * try fixing working dir * another try * another try * another try * another try * nix develop * Fix nix develop * turn debug logs on * use local-dev-simulated-core-ocr1 profile * add teardown step * uppdate crib actions refs * add ref comments * reduce logging * add a confluence link * pin CI versions * temporary enable a nightly run --------- Co-authored-by: chainchad <[email protected]> Co-authored-by: Radek Scheibinger <[email protected]>
- Loading branch information
1 parent
84630b8
commit 08638ff
Showing
13 changed files
with
199 additions
and
182 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,111 @@ | ||
# this is disabled because of GAP limitations, should be re-enabled when github-actions-controller will be installed | ||
name: CRIB Integration Tests | ||
on: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
workflow_call: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
environment: integration | ||
permissions: | ||
id-token: write | ||
contents: read | ||
actions: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
#name: CRIB Integration Tests | ||
#on: | ||
# push: | ||
# workflow_call: | ||
#concurrency: | ||
# group: ${{ github.workflow }}-${{ github.ref }} | ||
# cancel-in-progress: true | ||
#jobs: | ||
# test: | ||
# runs-on: ubuntu-latest | ||
# environment: integration | ||
# permissions: | ||
# id-token: write | ||
# contents: read | ||
# actions: read | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
# | ||
# - name: Setup Nix + GATI environment | ||
# uses: smartcontractkit/.github/actions/setup-nix-gati@514fe346780e2eddf7ea8b9f48120c2fba120d94 | ||
# with: | ||
# aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_AUTO_PR_TOKEN_ISSUER_ROLE_ARN }} | ||
# aws-lambda-url: ${{ secrets.AWS_CORE_TOKEN_ISSUER_LAMBDA_URL }} # see https://github.com/smartcontractkit/ infra/blob/a79bcfb48315c4411023c182e98eb80ff9e9cda6/accounts/production/us-west-2/lambda/ github-app-token-issuer-production/teams/releng/config.json#L9 | ||
# aws-region: ${{ secrets.AWS_REGION }} | ||
# aws-role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }} | ||
# enable-magic-cache: true | ||
# | ||
# - name: Nix Develop Action | ||
# uses: nicknovitski/nix-develop@v1 | ||
# with: | ||
# arguments: "--accept-flake-config" | ||
# - name: setup-gap | ||
# uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # [email protected] | ||
# with: | ||
# aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_STAGE }} | ||
# api-gateway-host: ${{ secrets.AWS_API_GW_HOST_K8S_STAGE }} | ||
# aws-region: ${{ secrets.AWS_REGION }} | ||
# ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
# k8s-cluster-name: ${{ secrets.AWS_K8S_CLUSTER_NAME_STAGE }} | ||
# use-private-ecr-registry: true | ||
# use-k8s: true | ||
# metrics-job-name: "k8s" | ||
# gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
# gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
# gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
# - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
# name: Checkout CRIB repository | ||
# with: | ||
# repository: 'smartcontractkit/crib' | ||
# ref: 'main' | ||
# - name: Generate Short UUID | ||
# id: uuid | ||
# run: echo "CRIB_NAMESPACE=$(uuidgen | cut -c1-5)" >> $GITHUB_ENV | ||
# - name: Create a new CRIB environment | ||
# run: |- | ||
# devspace use namespace $CRIB_NAMESPACE | ||
# devspace deploy --profile local-dev-simulated-core-ocr1 | ||
# - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
# - name: Setup go | ||
# uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
# 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: ${{ env.CRIB_NAMESPACE }} | ||
# CRIB_NETWORK: geth | ||
# CRIB_NODES: 5 | ||
# run: |- | ||
# go test -v -run TestCRIB | ||
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: setup-gap crib | ||
uses: smartcontractkit/.github/actions/setup-gap@00b58566e0ee2761e56d9db0ea72b783fdb89b8d # [email protected] | ||
with: | ||
aws-role-duration-seconds: 3600 # 1 hour | ||
aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_STAGE }} | ||
api-gateway-host: ${{ secrets.AWS_API_GW_HOST_CRIB_STAGE }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
k8s-cluster-name: ${{ secrets.AWS_K8S_CLUSTER_NAME_STAGE }} | ||
gap-name: crib | ||
use-private-ecr-registry: true | ||
use-tls: true | ||
proxy-port: 8080 | ||
metrics-job-name: "test" | ||
gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
|
||
- name: setup-gap k8s | ||
uses: smartcontractkit/.github/actions/setup-gap@00b58566e0ee2761e56d9db0ea72b783fdb89b8d # [email protected] | ||
with: | ||
aws-role-duration-seconds: 3600 # 1 hour | ||
aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_STAGE }} | ||
api-gateway-host: ${{ secrets.AWS_API_GW_HOST_K8S_STAGE }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
k8s-cluster-name: ${{ secrets.AWS_K8S_CLUSTER_NAME_STAGE }} | ||
gap-name: k8s | ||
use-private-ecr-registry: true | ||
use-k8s: true | ||
proxy-port: 8443 | ||
metrics-job-name: "test" | ||
gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
|
||
- name: Setup GitHub token using GATI | ||
id: token | ||
uses: smartcontractkit/.github/actions/setup-github-token@c0b38e6c40d72d01b8d2f24f92623a2538b3dedb # main | ||
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 Core | ||
uses: smartcontractkit/.github/actions/crib-deploy-environment@c0b38e6c40d72d01b8d2f24f92623a2538b3dedb # [email protected] | ||
id: deploy-crib | ||
with: | ||
github-token: ${{ steps.token.outputs.access-token }} | ||
api-gateway-host: ${{ secrets.AWS_API_GW_HOST_K8S_STAGE }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_STAGE }} | ||
ecr-private-registry-stage: ${{ secrets.AWS_ACCOUNT_ID_STAGE }} | ||
ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }} | ||
ingress-base-domain: ${{ secrets.INGRESS_BASE_DOMAIN_STAGE }} | ||
k8s-cluster-name: ${{ secrets.AWS_K8S_CLUSTER_NAME_STAGE }} | ||
devspace-profiles: "local-dev-simulated-core-ocr1" | ||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
- name: Setup go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
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 }} | ||
CRIB_NETWORK: geth | ||
CRIB_NODES: 5 | ||
GAP_URL: ${{ secrets.GAP_URL }} | ||
# SETH_LOG_LEVEL: debug | ||
# RESTY_DEBUG: true | ||
# TEST_PERSISTENCE: true | ||
run: |- | ||
go test -v -run TestCRIB | ||
- 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 }} |
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
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
Oops, something went wrong.