Skip to content

Commit

Permalink
[TT-414] Solana Dockerization
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Oct 2, 2023
1 parent 26fdcf3 commit 48d2a16
Show file tree
Hide file tree
Showing 14 changed files with 2,145 additions and 334 deletions.
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"
check-latest: true
Expand Down
73 changes: 13 additions & 60 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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

# Only run 1 of this workflow at a time per PR
Expand All @@ -33,35 +32,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 +49,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 +64,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 +74,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 +86,9 @@ jobs:
pull-requests: write
id-token: write
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu20.04-8cores-32GB

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,13 +109,18 @@ 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
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
go_mod_path: ./integration-tests/go.mod
cl_repo: ${{ env.CL_ECR }}
cl_image_tag: solana.${{ github.sha }}
cl_image_tag: solana.${{ github.event.inputs.cl_branch_ref || github.sha }}
artifacts_location: /home/runner/work/chainlink-solana/chainlink-solana/integration-tests/logs
token: ${{ secrets.GITHUB_TOKEN }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
Expand Down
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
2 changes: 1 addition & 1 deletion integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contents

- [How To Run E2E Tests](../../docs/RunningE2eTests.md)
- [How To Run E2E Tests](../docs/RunningE2eTests.md)
Loading

0 comments on commit 48d2a16

Please sign in to comment.