Skip to content

Commit

Permalink
Last changes from develop to v1.15.x (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinaNikolaevaa authored Oct 4, 2024
1 parent e498509 commit 02b9a21
Show file tree
Hide file tree
Showing 129 changed files with 7,233 additions and 1,801 deletions.
21 changes: 16 additions & 5 deletions .github/actions/dockerize-neon-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
image_tag: # id of input
description: 'neon tests image tag'
required: true
image_name:
description: 'neon tests image name'
required: true
oz_tag:
description: 'tag name for oz tests'
required: true
Expand All @@ -14,6 +17,9 @@ inputs:
docker_password:
description: 'docker hub password'
required: true
docker_hub_org_name:
description: 'docker hub organization name'
required: true

runs:
using: composite
Expand All @@ -33,15 +39,20 @@ runs:
- name: Build and push neon tests docker image
id: docker_pipeline
shell: bash
env:
DOCKER_HUB_ORG_NAME: ${{ inputs.docker_hub_org_name }}
run: |
image_id="neonlabsorg/neon_tests"
image_name=${{ inputs.image_name }}
delimeter=$(printf "%0.s-" {1..30})
echo " ${delimeter} Build new docker image ${image_id} ${delimeter}"
docker build . --no-cache --tag ${image_id}:${{ inputs.image_tag }} --build-arg OZ_TAG='${{ inputs.oz_tag }}' --build-arg CONTRACTS_BRANCH="${{ steps.feature_branch.outputs.value || 'develop'}}"
echo " ${delimeter} Build new docker image ${image_name} ${delimeter}"
docker build . --no-cache --tag ${image_name}:${{ inputs.image_tag }} \
--build-arg OZ_TAG='${{ inputs.oz_tag }}' \
--build-arg CONTRACTS_BRANCH="${{ steps.feature_branch.outputs.value || 'develop'}}" \
--build-arg DOCKER_HUB_ORG_NAME="${{env.DOCKER_HUB_ORG_NAME}}"
if [[ "${{ steps.feature_branch.outputs.value }}" != '' ]]; then
docker tag ${image_id}:${{ inputs.image_tag }} ${image_id}:${{ steps.feature_branch.outputs.value }}
docker tag ${image_name}:${{ inputs.image_tag }} ${image_name}:${{ steps.feature_branch.outputs.value }}
fi;
echo "${delimeter} Login into Docker registry as ${{ inputs.docker_username }} ${delimeter}"
echo "${{ inputs.docker_password }}" | docker login -u ${{ inputs.docker_username }} --password-stdin
echo "${delimeter} Push image ${image_id} to Docker registry ${delimeter}"
docker push --all-tags ${image_id}
docker push --all-tags ${image_name}
45 changes: 38 additions & 7 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@ on:
- 8
- 12
- auto
generate_cost_report:
type: boolean
default: false
required: false
description: "Flag defining whether cost report should be generated"
env:
NETWORK: ${{ github.event.inputs.network || 'terraform' }}
NUMPROCESSES: ${{ github.event.inputs.numprocesses || 8 }}
BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
SOLANA_URL: "${{ secrets.SOLANA_URL }}"
FAUCET_URL: "${{ secrets.DEVNET_FAUCET_URL }}"
IMAGE: neonlabsorg/neon_tests
IMAGE: ${{ github.repository_owner }}/neon_tests
DOCKER_HUB_ORG_NAME: ${{ github.repository_owner }}
GENERATE_COST_REPORT: ${{ github.event.inputs.generate_cost_report || 'false' }}
jobs:
dockerize:
if: ${{ github.ref_name != 'develop'}}
Expand All @@ -51,6 +58,8 @@ jobs:
image_tag: ${{ github.sha }}
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
image_name: ${{ env.IMAGE }}
docker_hub_org_name: ${{ env.DOCKER_HUB_ORG_NAME }}
prepare-env:
runs-on: ubuntu-20.04
if: always()
Expand Down Expand Up @@ -126,20 +135,43 @@ jobs:
/bin/bash -c "export SOLANA_URL=http://${{ env.SOLANA_IP }}:8899 \
&& export NEON_CORE_API_URL=http://${{ env.SOLANA_IP }}:8085/api \
&& export NEON_CORE_API_RPC_URL=http://${{ env.SOLANA_IP }}:3100 \
&& python3 ./clickfile.py run evm --numprocesses 8 --keep-error-log"
&& python3 ./clickfile.py run evm --numprocesses 8 --network terraform --keep-error-log"
- name: Set failed test group to evm
if: failure()
run: echo "FAILED_TEST_GROUP=evm" >> $GITHUB_ENV
- name: Run basic proxy tests
timeout-minutes: 60
id: basic
run: |
docker exec -i ${{ env.CONTAINER }} \
/bin/bash -c "export DEVNET_FAUCET_URL=${{ env.FAUCET_URL }} && \
python3 ./clickfile.py run basic --network ${{ env.NETWORK }} --numprocesses ${{ env.NUMPROCESSES }}"
CMD="python3 ./clickfile.py run basic --network ${{ env.NETWORK }} --numprocesses ${{ env.NUMPROCESSES }}"
if [[ "${{ env.GENERATE_COST_REPORT }}" == "true" ]]; then
CMD="$CMD --cost_reports_dir reports/cost_reports"
fi

docker exec -i ${{ env.CONTAINER }} /bin/bash -c "export DEVNET_FAUCET_URL=${{ env.FAUCET_URL }} && $CMD"

- name: Set failed test group to basic
if: failure()
run: echo "FAILED_TEST_GROUP=basic" >> $GITHUB_ENV
- name: Copy cost reports from container
if: ${{ env.GENERATE_COST_REPORT == 'true' }}
run: |
mkdir -p ./reports/cost_reports/ && \
docker cp ${{ env.CONTAINER }}:/opt/neon-tests/reports/cost_reports/. ./reports/cost_reports/
- name: Upload cost reports as artifacts
if: ${{ env.GENERATE_COST_REPORT == 'true' }}
uses: actions/upload-artifact@v4
with:
name: cost-reports
path: reports/cost_reports/**.json
- name: Save Cost Reports to cost_reports.md and echo to Summary
if: ${{ env.GENERATE_COST_REPORT == 'true' }}
run: |
docker exec -i -e NETWORK=${{ env.NETWORK }} ${{ env.CONTAINER }} \
python3 ./clickfile.py dapps save_dapps_cost_report_to_md \
--directory reports/cost_reports && \
docker exec -i ${{ env.CONTAINER }} cat cost_reports.md >> $GITHUB_STEP_SUMMARY
- name: "Generate allure report"
if: always()
uses: ./.github/actions/generate-allure-report
Expand All @@ -154,7 +186,7 @@ jobs:
run: |
docker exec -i ${{ env.CONTAINER }} \
python3 ./clickfile.py send-notification -u ${{ secrets.SLACK_QA_CHANNEL_URL }} \
-b ${{ env.BUILD_URL }} -n ${{ env.NETWORK }} --test-group ${{ env.FAILED_TEST_GROUP }}
-b ${{ env.BUILD_URL }} --network ${{ env.NETWORK }} --test-group ${{ env.FAILED_TEST_GROUP }}
- name: Remove docker container
if: always()
run: docker rm -f ${{ env.CONTAINER }}
Expand All @@ -178,4 +210,3 @@ jobs:
uses: ./.github/actions/destroy-tf-stand
with:
ci_stands_key_hcloud: ${{ secrets.CI_STANDS_KEY_HCLOUD }}

9 changes: 6 additions & 3 deletions .github/workflows/compiler_compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ env:
FAUCET_URL: "${{ secrets.DEVNET_FAUCET_URL }}"
SOLANA_URL: "${{ secrets.SOLANA_URL }}"
NUMPROCESSES: 2
IMAGE: neonlabsorg/neon_tests
IMAGE: ${{ github.repository_owner }}/neon_tests
CONTAINER: compilers-${{ github.run_id }}
DOCKER_HUB_ORG_NAME: ${{ github.repository_owner }}
jobs:
dockerize:
if: ${{ github.ref_name != 'develop'}}
Expand All @@ -41,7 +42,9 @@ jobs:
image_tag: ${{ github.sha }}
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}

image_name: ${{ env.IMAGE }}
docker_hub_org_name: ${{ env.DOCKER_HUB_ORG_NAME }}

prepare-env:
runs-on: ubuntu-20.04
if: always()
Expand Down Expand Up @@ -120,7 +123,7 @@ jobs:
run: |
docker exec -i ${{ env.CONTAINER }} \
python3 ./clickfile.py send-notification -u ${{ secrets.SLACK_QA_CHANNEL_URL }} \
-b ${{ env.BUILD_URL }} -n ${{ env.NETWORK }} --test-group compiler_compatibility
-b ${{ env.BUILD_URL }} --network ${{ env.NETWORK }} --test-group compiler_compatibility
- name: Remove docker container
if: always()
run: docker rm -f ${{ env.CONTAINER }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dapps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
proxy_ip: ${{ needs.prepare.outputs.proxy_ip }}
solana_ip: ${{ needs.prepare.outputs.solana_ip }}
external_call: false
repo: "tests"

notify:
runs-on: ubuntu-20.04
Expand Down
Loading

0 comments on commit 02b9a21

Please sign in to comment.