Skip to content

Merge pull request #472 from Concordium/bugfix/contracts-init-macro-e… #55

Merge pull request #472 from Concordium/bugfix/contracts-init-macro-e…

Merge pull request #472 from Concordium/bugfix/contracts-init-macro-e… #55

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
paths:
- 'smart-contracts/contracts-common/**/*.rs'
- 'smart-contracts/contracts-common/**/*.toml'
pull_request:
branches:
- main
paths:
- 'smart-contracts/contracts-common/**/*.rs'
- 'smart-contracts/contracts-common/**/*.toml'
name: Clippy & fmt
env:
RUST_VERSION: "1.65"
RUST_FMT: "nightly-2023-04-01"
WORKING_DIRECTORY: "./smart-contracts/contracts-common"
jobs:
rustfmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install nightly toolchain with rustfmt available
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_FMT }}
override: true
components: rustfmt
- name: Run cargo fmt
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
cargo fmt --all --check
rustdoc:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Run cargo doc
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --color=always
clippy:
name: Clippy on concordium-contracts-common
runs-on: ubuntu-latest
strategy:
matrix:
features:
- ""
- "std"
- "derive-serde"
- "fuzz"
- "smart-contract"
- "wasm-test"
- "build-schema"
- "concordium-quickcheck"
target:
- wasm32-unknown-unknown
- x86_64-unknown-linux-gnu
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install nightly toolchain with clippy available
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
target: ${{ matrix.target }}
override: true
components: clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
working-directory: ${{ env.WORKING_DIRECTORY }}

Check failure on line 96 in .github/workflows/build-test-contracts-common.yaml

View workflow run for this annotation

GitHub Actions / Clippy & fmt

Invalid workflow file

The workflow is not valid. .github/workflows/build-test-contracts-common.yaml (Line: 96, Col: 9): Unexpected value 'working-directory' .github/workflows/build-test-contracts-common.yaml (Line: 129, Col: 9): Unexpected value 'working-directory'
with:
command: clippy
args: --manifest-path=concordium-contracts-common/Cargo.toml --target=${{ matrix.target }} --features=${{ matrix.features }} --no-default-features -- -D warnings
clippy-on-derive:
name: Clippy on concordium-contracts-common-derive
runs-on: ubuntu-latest
strategy:
matrix:
features:
- ""
- "wasm-test"
- "build-schema"
- "concordium-quickcheck"
target:
- wasm32-unknown-unknown
- x86_64-unknown-linux-gnu
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install nightly toolchain with clippy available
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
target: ${{ matrix.target }}
override: true
components: clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
working-directory: ${{ env.WORKING_DIRECTORY }}
with:
command: clippy
args: --manifest-path=concordium-contracts-common-derive/Cargo.toml --target=${{ matrix.target }} --no-default-features -- -D warnings
test:
name: x86_64 tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
working-directory: ${{ env.WORKING_DIRECTORY }}
with:
command: test
args: --workspace --all-features