Merge pull request #328 from Concordium/feature/COR-2315-precision-nu… #1429
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
| name: Build and test | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| workflow_dispatch: # allows manual trigger | |
| jobs: | |
| rustfmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Run cargo fmt | |
| run: | | |
| rustup component add rustfmt | |
| cargo 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: Setup dependencies | |
| run: | | |
| cd notification-server | |
| make setup-db && make | |
| - 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: ["wallet-connect-test-bench/smart-contract"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install rustfmt and Clippy | |
| run: | | |
| rustup component add rustfmt | |
| rustup component add clippy | |
| - name: Run cargo fmt | |
| run: | | |
| cargo 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: Run tests | |
| run: | | |
| cargo test --manifest-path=${{ matrix.crate }}/Cargo.toml --locked --all-features --release |