-
Notifications
You must be signed in to change notification settings - Fork 17
feat: update rust lint and test job #142
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
Open
nb-ccd
wants to merge
47
commits into
main
Choose a base branch
from
SRE-1025/rust-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 35 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
65e5f6d
feat: update rust lint and test job
nb-ccd 0033622
fix: run build and test workflows if the sdk changes
nb-ccd bb6efcf
fix: cause linter to pass
nb-ccd d861d1f
fix: remove dummy changes in Rust files
nb-ccd d0cbda0
wip: refactor to run single job
nb-ccd 643ed00
fix: correct cargo.toml casing
nb-ccd bfc46cc
fix: correct step name, remove debug output
nb-ccd 422ed0e
fix: update dockerfiles to run Rust builds from workspace root
nb-ccd c3ecbdb
fix: update dockerfiles
nb-ccd c2e566e
chore: dummy commit to trigger CI
nb-ccd 07044a0
fix: add lint/fmt instructions for cis2-marketplace dapp
nb-ccd c5afbeb
fix: move rustfmt, revert unneeded version change
nb-ccd 7f30fd3
fix: matrix build for smart contracts
nb-ccd ea6dc4b
fix: move rustfmt.toml since it makes build fail at top level, commit…
nb-ccd 6d95057
fix: workspace declaration for cis2-market
nb-ccd 911ac78
fix: remove unused smart contract profile
nb-ccd edca9e6
fix
allanbrondum 5385f50
fix
allanbrondum 486cbf5
fix
allanbrondum a59dcd4
rename
allanbrondum a7dadc7
remove draft checks in ci
allanbrondum 9dd22cf
use patch
allanbrondum 36b67c8
merge
allanbrondum 6cf958d
fix
allanbrondum 1b3a5ab
fx
allanbrondum 432c88a
fix
allanbrondum ec70ebb
fix
allanbrondum 0c176ec
fix
allanbrondum 9ee6b14
fix
allanbrondum 7accc9f
fix
allanbrondum 46d4e73
doc
allanbrondum 817d2c1
resolver3
allanbrondum 50b58ce
use newer nightly version for formatting
allanbrondum 22c8e18
revert
allanbrondum e2360c5
rollback
allanbrondum b76d68b
Merge branch 'main' of github.com:Concordium/concordium-dapp-examples…
allanbrondum da4337c
cleanup
allanbrondum 5eafd1f
fmt with stable
allanbrondum 92d2e80
reintroduceprofile
allanbrondum 672ea81
fix docker build changes check
allanbrondum ad1e662
remove documentation about submodules and nightly toolchain
allanbrondum 85e8938
Merge branch 'main' of github.com:Concordium/concordium-dapp-examples…
allanbrondum 2023f46
fix naming
allanbrondum 58e7091
fix
allanbrondum b6355c0
fix
allanbrondum fc6bebc
track and trace common
allanbrondum 60675d0
fix
allanbrondum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: "Rust: build and test" | ||
|
|
||
| on: | ||
| push: | ||
| branches: main | ||
allanbrondum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| pull_request: | ||
|
|
||
| workflow_dispatch: # allows manual trigger | ||
|
|
||
| env: | ||
| RUST_FMT_VERSION: nightly-2023-04-01-x86_64-unknown-linux-gnu | ||
| CARGO_CONCORDIUM_VERSION: "4.2.0" | ||
|
|
||
| jobs: | ||
|
|
||
| rustfmt: | ||
| name: Rustfmt | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Run cargo fmt | ||
| run: | | ||
| rustup +${{ env.RUST_FMT_VERSION }} component add rustfmt | ||
| cargo +${{ env.RUST_FMT_VERSION }} fmt --check | ||
|
|
||
| clippy: | ||
| name: Clippy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Install Clippy | ||
| run: | | ||
| rustup component add clippy | ||
| - name: Run Clippy | ||
| run: | | ||
| cargo clippy --locked --all-targets --all-features --no-deps -- -D warnings | ||
|
|
||
| tests: | ||
| name: Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Run tests | ||
| run: | | ||
| cargo test --locked --all-features --release | ||
|
|
||
| # Smart contracts currently has to be standalone crates and not part of the repo workspace | ||
| # due to how cargo-concordium verifiable build works | ||
| smart_contracts: | ||
| name: "Smart contract: ${{ matrix.crate }}" | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| crate: [ "low-code-nft-marketplace/cis2-market", "trackAndTrace/smart-contract"] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Install rustfmt and Clippy etc. | ||
| run: | | ||
| rustup +${{ env.RUST_FMT_VERSION }} component add rustfmt | ||
| rustup component add clippy | ||
| rustup target add wasm32-unknown-unknown | ||
| - name: Run cargo fmt | ||
| run: | | ||
| cargo +${{ env.RUST_FMT_VERSION }} fmt --manifest-path=${{ matrix.crate }}/Cargo.toml --check | ||
| - name: Run Clippy | ||
| run: | | ||
| cargo clippy --manifest-path=${{ matrix.crate }}/Cargo.toml --locked --all-targets --all-features --no-deps -- -D warnings | ||
| - name: Download and install Cargo Concordium | ||
| run: | | ||
| curl -L https://github.com/Concordium/concordium-smart-contract-tools/releases/download/releases/cargo-concordium/${CARGO_CONCORDIUM_VERSION}/cargo-concordium-linux-amd64 -o /tmp/cargo-concordium | ||
| chmod +x /tmp/cargo-concordium | ||
| sudo mv /tmp/cargo-concordium /usr/bin/cargo-concordium | ||
| - name: Run cargo concordium build | ||
| run: | | ||
| cargo concordium build -- --manifest-path "${{ matrix.crate }}/Cargo.toml" | ||
| - name: Run cargo concordium test | ||
| run: | | ||
| cargo concordium test -- --manifest-path "${{ matrix.crate }}/Cargo.toml" | ||
allanbrondum marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.