Skip to content
Merged
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions .github/workflows/fmt-and-lint.yml

Copy link
Copy Markdown

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

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Build cache
uses: ./.github/actions/build-cache

- name: Backup Cargo.lock
run: cp Cargo.lock Cargo.lock.bak

Copy link
Copy Markdown

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
Copy Markdown
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


- name: fmt check
# Format checks aren't OS dependant.
if: matrix.os == 'ubuntu-latest'
Expand All @@ -37,6 +40,14 @@ jobs:
- name: clippy lint
run: cargo clippy --all-targets --all-features -- --D warnings

- name: Validate Cargo.lock
run: |
if ! diff Cargo.lock Cargo.lock.bak; then
echo "Error: Cargo.lock has changed during the workflow. Ensure Cargo.lock is up-to-date and committed."
exit 1
fi
shell: bash

wasm-lint:
name: Wasm Lint Checks
timeout-minutes: 45
Expand Down