git.delta.rocks / unique-network / refs/commits / 59980bb8b798

difftreelog

source

.github/workflows/codestyle.yml3.1 KiBsourcehistory
1name: Code style23on:4  pull_request:5    branches:6      - develop7    types:8      - opened9      - reopened10      - synchronize1112jobs:13  rustfmt:14    runs-on: self-hosted-ci1516    steps:17      - name: Skip if pull request is in Draft18        # `if: github.event.pull_request.draft == true` should be kept here, at19        # the step level, rather than at the job level. The latter is not20        # recommended because when the PR is moved from "Draft" to "Ready to21        # review" the workflow will immediately be passing (since it was skipped),22        # even though it hasn't actually ran, since it takes a few seconds for23        # the workflow to start. This is also disclosed in:24        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1725        # That scenario would open an opportunity for the check to be bypassed:26        # 1. Get your PR approved27        # 2. Move it to Draft28        # 3. Push whatever commits you want29        # 4. Move it to "Ready for review"; now the workflow is passing (it was30        #    skipped) and "Check reviews" is also passing (it won't be updated31        #    until the workflow is finished)32        if: github.event.pull_request.draft == true33        run: exit 13435      - uses: actions/checkout@v136      - name: Install latest nightly37        uses: actions-rs/toolchain@v138        with:39            toolchain: nightly40            default: true41            target: wasm32-unknown-unknown42            components: rustfmt, clippy43      - name: Run cargo fmt44        run: cargo fmt -- --check4546  clippy:47    if: ${{ false }}48    runs-on: self-hosted-ci4950    steps:51      - name: Skip if pull request is in Draft52        # `if: github.event.pull_request.draft == true` should be kept here, at53        # the step level, rather than at the job level. The latter is not54        # recommended because when the PR is moved from "Draft" to "Ready to55        # review" the workflow will immediately be passing (since it was skipped),56        # even though it hasn't actually ran, since it takes a few seconds for57        # the workflow to start. This is also disclosed in:58        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1759        # That scenario would open an opportunity for the check to be bypassed:60        # 1. Get your PR approved61        # 2. Move it to Draft62        # 3. Push whatever commits you want63        # 4. Move it to "Ready for review"; now the workflow is passing (it was64        #    skipped) and "Check reviews" is also passing (it won't be updated65        #    until the workflow is finished)66        if: github.event.pull_request.draft == true67        run: exit 168        69      - uses: actions/checkout@v370      - name: Install substrate dependencies71        run: sudo apt-get install libssl-dev pkg-config libclang-dev clang72      - name: Install latest nightly73        uses: actions-rs/toolchain@v174        with:75            toolchain: nightly76            default: true77            target: wasm32-unknown-unknown78            components: rustfmt, clippy79      - name: Run cargo check80        run: cargo clippy -- -Dwarnings