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

chore(CI): validate Cargo lock file #2309

Merged
merged 3 commits into from
Jan 7, 2025
Merged

chore(CI): validate Cargo lock file #2309

merged 3 commits into from
Jan 7, 2025

Conversation

laruh
Copy link
Member

@laruh laruh commented Dec 27, 2024

No description provided.

mariocynicys
mariocynicys previously approved these changes Dec 27, 2024
Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

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

Thanks!
LGTM

borngraced
borngraced previously approved these changes Dec 27, 2024
Copy link
Member

Choose a reason for hiding this comment

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

I would create separate pipeline for checking Cargo.lock

Comment on lines 32 to 33
- name: Backup Cargo.lock
run: cp Cargo.lock Cargo.lock.bak
Copy link
Member

Choose a reason for hiding this comment

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

We could simply run cargo update -w --locked which will fail if Cargo.lock isn't up-to-date.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, does the job!
https://github.com/KomodoPlatform/komodo-defi-framework/actions/runs/12526268691/job/34938647572

      Adding web-time v1.1.0
error: the lock file /home/runner/work/komodo-defi-framework/komodo-defi-framework/Cargo.lock needs to be updated but --locked was passed to prevent this

commit 4d83f94

@laruh laruh dismissed stale reviews from borngraced and mariocynicys via 3fb42e3 December 28, 2024 11:37
@laruh laruh force-pushed the ci-check-cargo-lock branch from 3fb42e3 to 4d83f94 Compare December 28, 2024 11:42
Comment on lines 10 to 24
name: Validate Cargo.lock Consistency
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Rust toolchain
run: |
rustup toolchain install nightly-2023-06-01 --no-self-update --profile=minimal
rustup default nightly-2023-06-01

- name: Validate Cargo.lock
run: |
echo "Checking if Cargo.lock is up-to-date..."
cargo update -w --locked
Copy link
Member

Choose a reason for hiding this comment

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

to simplify:

Suggested change
name: Validate Cargo.lock Consistency
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
run: |
rustup toolchain install nightly-2023-06-01 --no-self-update --profile=minimal
rustup default nightly-2023-06-01
- name: Validate Cargo.lock
run: |
echo "Checking if Cargo.lock is up-to-date..."
cargo update -w --locked
name: Checking Cargo.lock file
runs-on: ubuntu-latest
steps:
uses: actions/checkout@v3
- name: Validate Cargo.lock
run: cargo update -w --locked

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we really need to skip rustup toolchain install step?

Copy link
Member

Choose a reason for hiding this comment

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

We could as cargo update will trigger that already.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done e9ad8f8

@onur-ozkan onur-ozkan merged commit a9402c6 into dev Jan 7, 2025
17 of 24 checks passed
@onur-ozkan onur-ozkan deleted the ci-check-cargo-lock branch January 7, 2025 11:52
dimxy added a commit that referenced this pull request Jan 8, 2025
* dev:
  feat(tendermint): validators RPC (#2310)
  chore(CI): validate Cargo lock file (#2309)
  test(P2P): add test for peer time sync validation (#2304)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants