Skip to content

Merge pull request #333 from Concordium/COR-2330/audit-frontend2 #1439

Merge pull request #333 from Concordium/COR-2330/audit-frontend2

Merge pull request #333 from Concordium/COR-2330/audit-frontend2 #1439

Workflow file for this run

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