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

Upgrade prep #561

Merged
merged 16 commits into from
Oct 8, 2024
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
46 changes: 29 additions & 17 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
ORCHESTRATOR_IMAGE_NAME: orchestrator-orchestrator
ORCHESTRATOR_ARTIFACT: orchestrator_orchestrator
UPLOAD_DIR: /tmp/uploaded_artifacts
DOWNLOAD_DIR: /tmp/downloaded_artifacts

jobs:
rust-build:
Expand All @@ -35,29 +39,30 @@ jobs:
key: ${{ runner.os }}-multi-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-multi-buildx
- name: Container service login
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
- name: labels
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-orchestrator
- name: Build and push Docker image
images: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
- name: Make upload dir
run: mkdir -p ${{ env.UPLOAD_DIR }}
- name: build
uses: docker/build-push-action@v2
with:
context: ./orchestrator
builder: ${{ steps.buildx.outputs.name }}
context: orchestrator
file: orchestrator/Dockerfile
push: true
platforms: linux/amd64, linux/arm64/v8
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
outputs: type=docker,dest=${{ env.UPLOAD_DIR }}/${{ env.ORCHESTRATOR_ARTIFACT }}
- name: Make Orchestrator artifact available to other jobs
uses: actions/upload-artifact@v3
with:
name: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
path: ${{ env.UPLOAD_DIR }}/${{ env.ORCHESTRATOR_ARTIFACT }}
retention-days: 1
- name: Move Docker cache
run: |
rm -rf /tmp/.buildx-cache
Expand Down Expand Up @@ -264,7 +269,7 @@ jobs:
id: meta-orchestrator
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-orchestrator
images: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
- name: docker hardhat metadata
id: meta-hardhat
uses: docker/metadata-action@v3
Expand All @@ -274,8 +279,15 @@ jobs:
run: docker pull ${{ steps.meta-gravity.outputs.tags }}
- name: rename gravity image
run: docker tag ${{ steps.meta-gravity.outputs.tags }} gravity:prebuilt
- name: pull orchestrator image
run: docker pull ${{ steps.meta-orchestrator.outputs.tags }}
- name: Make download dir
run: mkdir -p ${{ env.DOWNLOAD_DIR }}
- name: Get orchestrator artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
path: ${{ env.DOWNLOAD_DIR }}
- name: Load orchestrator image
run: docker load --input ${{ env.DOWNLOAD_DIR }}/${{ env.ORCHESTRATOR_ARTIFACT }}
- name: rename orchestrator image
run: docker tag ${{ steps.meta-orchestrator.outputs.tags }} orchestrator:prebuilt
- name: pull hardhat image
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
id: rust-cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
orchestrator/target/
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
orchestrator/target
key: ${{ runner.os }}-cargo-${{ hashFiles('orchestrator/Cargo.lock') }}
- name: Run Orchestrator unit tests
run: cd orchestrator && cargo test --all --verbose
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ fail:
@false

e2e_happy_path: e2e_clean_slate
E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail
E2E_SKIP_CLEANUP=true integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail

e2e_valset_update: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail
integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail


e2e_validator_out: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail
integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

LGTM. Consistent change, but duplicate target detected.

The update to the test binary path is consistent with the previous targets and the AI-generated summary.

However, there's a duplicate target definition for e2e_validator_out (lines 25-26). Consider removing the duplicate target to avoid confusion and potential conflicts.


e2e_transaction_stress: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail
integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail

Loading
Loading