Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-414] Solana Dockerization #545

Merged
merged 6 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
self-hosted-runner:
# Labels of self-hosted or large runner labels in array of string
labels:
- ubuntu20.04-4cores-16GB
- ubuntu20.04-8cores-32GB
- ubuntu20.04-16cores-64GB
- ubuntu20.04-32cores-128GB
- ubuntu20.04-64cores-256GB
2 changes: 1 addition & 1 deletion .github/actions/build_contract_artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
repository: smartcontractkit/chainlink-solana
ref: ${{ inputs.ref }}
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: isn't this the default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check-latest: true
Expand Down
84 changes: 21 additions & 63 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:

env:
CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ github.sha }}
CONTRACT_ARTIFACTS_PATH: contracts/target/deploy
MOD_CACHE_VERSION: 1

# Only run 1 of this workflow at a time per PR
concurrency:
Expand All @@ -33,35 +33,14 @@ jobs:
id: psversion
uses: ./.github/actions/projectserum_version

test-image-exists:
environment: integration
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
name: Check If Solana Test Image Exists
runs-on: ubuntu-latest
outputs:
exists: ${{ steps.check-image.outputs.exists }}
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@ad22fbd6f4d108b82aaf49b527bcf40f32babea8 # v2.2.1
with:
repository: chainlink-solana-tests
tag: ${{ github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}

e2e_custom_build_artifacts:
name: E2E Custom Build Artifacts
environment: integration
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
needs: [get_projectserum_version, test-image-exists]
runs-on: ubuntu20.04-32cores-128GB
needs: [get_projectserum_version]
container:
image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }}
env:
Expand All @@ -71,12 +50,11 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Build contracts
if: needs.test-image-exists.outputs.exists == 'false'
uses: ./.github/actions/build_contract_artifacts

e2e_custom_build_custom_chainlink_image:
name: E2E Custom Build Custom CL Image
runs-on: ubuntu-latest
runs-on: ubuntu20.04-16cores-64GB
environment: integration
permissions:
id-token: write
Expand All @@ -87,7 +65,7 @@ jobs:
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@ad22fbd6f4d108b82aaf49b527bcf40f32babea8 # v2.2.1
with:
repository: chainlink
tag: solana.${{ github.sha }}
tag: solana.${{ github.event.inputs.cl_branch_ref || github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Image
Expand All @@ -97,39 +75,10 @@ jobs:
cl_repo: smartcontractkit/chainlink
cl_ref: ${{ github.event.inputs.cl_branch_ref }}
dep_solana_sha: ${{ github.event.pull_request.head.sha }}
push_tag: ${{ env.CL_ECR }}:solana.${{ github.sha }}
push_tag: ${{ env.CL_ECR }}:solana.${{ github.event.inputs.cl_branch_ref || github.sha }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}

build_test_image:
environment: integration
permissions:
id-token: write
contents: read
name: Build Test Image
runs-on: ubuntu-latest
needs: [e2e_custom_build_artifacts]
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@v1
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: Build Test Image
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Build Image
uses: ./.github/actions/build-test-image
with:
artifacts_path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
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 }}

e2e_custom_run_smoke_tests:
name: E2E Custom Run Smoke Tests
environment: integration
Expand All @@ -138,9 +87,9 @@ jobs:
pull-requests: write
id-token: write
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu20.04-16cores-64GB

needs: [e2e_custom_build_artifacts, e2e_custom_build_custom_chainlink_image, build_test_image]
needs: [e2e_custom_build_artifacts, e2e_custom_build_custom_chainlink_image]
env:
TEST_SUITE: smoke
TEST_ARGS: -test.timeout 30m
Expand All @@ -161,16 +110,25 @@ jobs:
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ad22fbd6f4d108b82aaf49b527bcf40f32babea8 # v2.2.1
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
with:
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestSolanaOCRV2Smoke -json $(args) ./smoke 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
go_mod_path: ./integration-tests/go.mod
cl_repo: ${{ env.CL_ECR }}
cl_image_tag: solana.${{ github.sha }}
artifacts_location: /home/runner/work/chainlink-solana/chainlink-solana/integration-tests/logs
cl_image_tag: solana.${{ github.event.inputs.cl_branch_ref || github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: smoke-test-logs
artifacts_location: ./integration-tests/smoke/logs/
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
should_cleanup: false
cache_key_id: solana-e2e-${{ env.MOD_CACHE_VERSION }}
cache_restore_only: "false"
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ gauntlet/packages/gauntlet-serum-multisig/networks/.env.local

# test
id.json
tests/e2e/logs
tests/e2e/smoke/logs
tests/e2e/smoke/contracts-chaos-state.json
integration-tests/smoke/logs
integration-tests/smoke/contracts-chaos-state.json
tmp-manifest-*
tests-smoke-report.xml
.env.test*
Expand Down
Loading
Loading