-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Gauntlet++ Op Client and Op Requests into E2E Integration Tests (#…
…548) * gpp start * Initial G++ E2E Ops * Added logging * More gpp ops * Logging and OCR2 ops * Removed comments * Go mod * Refactor for Sonarqube * Adding G++ go env * Revert "Adding G++ go env" This reverts commit 358cf94. * Adding GOPRIVATE Env to relayer * Revision changes * Trying to use GOPRIVATE with GHT * Testing GATI * Added OZ Account deploy and refactored to declare into deploy ops * Added secrest for GHA * Added permissions * Adding GOPRIVATE * Changed access token to output of gati * explicit gpp repo * wip * Adding explicit definition * Added GOENV * debug step * oath2 * new auth url * Revision to stable version * Fix dependencies * Fixed lint and other workflows * permissions * Added actions GATI * Reverted some stuff * Moved GATI action back into action * inputs typo * Sending GATI token into dockerfile * Echo debug * Moved it up to see if it runs * Bash syntax * lint changes * Lint and adding new token to workflow * Fix * Adding new command to pass workflow * Lint fix * Editted Makefile and workflow * Right path to makefile * Fixed file path for lint skip * Barebones command for env * Re-addedo org work flow * Pull from new chainlink-github-actions tag * commit hash bump for testing framework * bump * Removed unnec command * bump run-tests version * remove unused linter from common * re-added vender command * Using qa repo for github actions * ARG to ENV to fix sonarqube * Re-added github token as ARG * Refactored out setting github configs with gati token * fix indentation
- Loading branch information
1 parent
16426aa
commit 2a39b51
Showing
19 changed files
with
660 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Setup GitHub Private Repo Access | ||
description: Uses a GATI Token to be able to pull from private repos | ||
|
||
inputs: | ||
gati_token: | ||
description: 'GATI Token used to pull private repos' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Go with private repo access | ||
shell: bash | ||
run: | | ||
git config --global url."https://x-access-token:${{ inputs.gati_token }}@github.com/".insteadOf "https://github.com/" | ||
go env -w GOPRIVATE=github.com/smartcontractkit/* |
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 |
---|---|---|
|
@@ -51,10 +51,24 @@ jobs: | |
golang_lint_ops: | ||
name: Golang Lint Ops | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
needs: [golangci-lint-version] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup GitHub Token | ||
id: setup-github-token | ||
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected] | ||
with: | ||
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }} | ||
aws-region: ${{ secrets.QA_AWS_REGION }} | ||
- name: Setup Go with private repo access | ||
uses: ./.github/actions/setup-github-private-access | ||
with: | ||
gati_token: ${{ steps.setup-github-token.outputs.access-token }} | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6 | ||
with: | ||
|
@@ -74,10 +88,24 @@ jobs: | |
golang_lint_integration_tests: | ||
name: Golang Lint Integration Tests | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
needs: [golangci-lint-version] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup GitHub Token | ||
id: setup-github-token | ||
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected] | ||
with: | ||
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }} | ||
aws-region: ${{ secrets.QA_AWS_REGION }} | ||
- name: Setup Go with private repo access | ||
uses: ./.github/actions/setup-github-private-access | ||
with: | ||
gati_token: ${{ steps.setup-github-token.outputs.access-token }} | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6 | ||
with: | ||
|
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 |
---|---|---|
|
@@ -109,6 +109,13 @@ jobs: | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
this-job-name: Build Test Image | ||
continue-on-error: true | ||
- name: Setup GitHub Token | ||
id: setup-github-token | ||
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected] | ||
with: | ||
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }} | ||
aws-region: ${{ secrets.QA_AWS_REGION }} | ||
- name: Checkout the repo | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
|
@@ -119,6 +126,7 @@ jobs: | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | ||
GITHUB_TOKEN: ${{ steps.setup-github-token.outputs.access-token }} | ||
|
||
run_tests: | ||
name: Run Smoke Tests ${{matrix.image.name}} | ||
|
@@ -162,6 +170,13 @@ jobs: | |
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: Install Cairo | ||
uses: ./.github/actions/install-cairo | ||
- name: Setup GitHub Token | ||
id: setup-github-token | ||
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected] | ||
with: | ||
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }} | ||
aws-region: ${{ secrets.QA_AWS_REGION }} | ||
- name: Build contracts | ||
run: | | ||
cd contracts && scarb --profile release build | ||
|
@@ -184,7 +199,7 @@ jobs: | |
# shellcheck disable=SC2086 | ||
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV | ||
- name: Run Tests ${{ matrix.image.name }} | ||
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@00c164251be2a7c5b2b23a6e5f7014982f232c14 # v2.3.31 | ||
uses: smartcontractkit/.github/actions/ctf-run-tests@002596f65dc8eb807f5c8729dc1080921f7d0b24 # 0.2.1 | ||
with: | ||
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | ||
test_command_to_run: nix develop -c sh -c "make test=${{ matrix.image.test-name }} test-integration-smoke-ci" | ||
|
@@ -197,6 +212,7 @@ jobs: | |
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | ||
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/smoke/logs | ||
gati_token: ${{ steps.setup-github-token.outputs.access-token }} | ||
env: | ||
KILLGRAVE_INTERNAL_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/friendsofgo/killgrave | ||
CHAINLINK_IMAGE: ${{ env.CL_ECR }} | ||
|
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 |
---|---|---|
|
@@ -59,13 +59,27 @@ jobs: | |
check-tidy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
- name: Set up Go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version-file: "relayer/go.mod" | ||
- name: Setup GitHub Token | ||
id: setup-github-token | ||
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected] | ||
with: | ||
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} | ||
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }} | ||
aws-region: ${{ secrets.QA_AWS_REGION }} | ||
- name: Setup Go with private repo access | ||
uses: ./.github/actions/setup-github-private-access | ||
with: | ||
gati_token: ${{ steps.setup-github-token.outputs.access-token }} | ||
- name: Ensure "make gomodtidy" has been run | ||
run: | | ||
make gomodtidy | ||
|
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package common | ||
|
||
import ( | ||
"encoding/json" | ||
"os" | ||
) | ||
|
||
func (m *OCRv2TestState) deployAccessControllerWithGpp() error { | ||
var err error | ||
m.Contracts.AccessControllerAddr, err = m.Clients.GauntletPPClient.DeployAccessControllerContract(m.Account.Account) | ||
if err != nil { | ||
return err | ||
} | ||
err = os.Setenv("BILLING_ACCESS_CONTROLLER", m.Contracts.AccessControllerAddr) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
} | ||
|
||
func (m *OCRv2TestState) declareLinkToken() error { | ||
err := m.Clients.GauntletPPClient.DeclareLinkTokenContract() | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (m *OCRv2TestState) deployLinkTokenWithGpp() error { | ||
var err error | ||
m.Contracts.LinkTokenAddr, err = m.Clients.GauntletPPClient.DeployLinkTokenContract(m.Account.Account) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
err = os.Setenv("LINK", m.Contracts.LinkTokenAddr) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
} | ||
|
||
func (m *OCRv2TestState) setConfigDetailsWithGpp(ocrAddress string) error { | ||
cfg, err := m.LoadOCR2Config() | ||
if err != nil { | ||
return err | ||
} | ||
var parsedConfig []byte | ||
parsedConfig, err = json.Marshal(cfg) | ||
if err != nil { | ||
return err | ||
} | ||
_, err = m.Clients.GauntletPPClient.SetConfigDetails(string(parsedConfig), ocrAddress) | ||
return err | ||
} |
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.