git.delta.rocks / unique-network / refs/commits / 6beef57bb5de

difftreelog

source

.github/workflows/codestyle.yml1.8 KiBsourcehistory
1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837012/Code+style+testing2# Nested workflow for checks related to formatting Rust code 34name: codestyle56# Triger: only call from main workflow(re-usable workflows)7on:8  workflow_call:910jobs:11  rustfmt:12    runs-on: [ self-hosted-ci ]13    steps:14      - name: Clean Workspace15        uses: AutoModality/action-clean@v1.1.016      - uses: actions/checkout@v3.1.017        with:18          ref: ${{ github.head_ref }}            19      - name: Install latest nightly20        uses: dtolnay/rust-toolchain@nightly21        with:22            targets: wasm32-unknown-unknown23            components: rustfmt, clippy24      - name: Run cargo fmt25        run: cargo fmt -- --check   # In that mode it returns only exit code.26      - name: Cargo fmt state27        if: success()28        run: echo "Nothing to do. Command 'cargo fmt -- --check' returned exit code 0."2930  yarn_eslint:31    runs-on: [ self-hosted-ci ]32    steps:33      - name: Clean Workspace34        uses: AutoModality/action-clean@v1.1.035      - uses: actions/checkout@v3.1.036        with:37          ref: ${{ github.head_ref }}            38      - uses: actions/setup-node@v3.5.139        with:40          node-version: 1641      - name: Install modules42        run: cd tests && yarn43      - name: Run ESLint44        run: cd tests && yarn eslint --ext .ts,.js src/4546  clippy:47    if: ${{ false }}48    runs-on: [ self-hosted-ci ]49    steps:50      - uses: actions/checkout@v3.1.051      - name: Install substrate dependencies52        run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler53      - name: Install latest nightly54        uses: dtolnay/rust-toolchain@nightly55        with:56            targets: wasm32-unknown-unknown57            components: rustfmt, clippy58      - name: Run cargo check59        run: cargo clippy -- -Dwarnings