Skip to content

Commit

Permalink
Ensure rust-check skips on docs only change
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Feb 21, 2022
1 parent 411a9b8 commit 5f2bf17
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -94,33 +94,35 @@ jobs:
steps:
- name: Install
uses: actions-rs/toolchain@v1
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
profile: minimal
toolchain: nightly-2021-11-15
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v2
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
path: ~/.cargo/registry
key: stable-ubuntu-clippy-cargo-registry

- name: Cache cargo index
uses: actions/cache@v2
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
path: ~/.cargo/git
key: stable-ubuntu-clippy-cargo-index

- uses: actions/cache@v2
id: restore-build
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}

- name: Check
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
run: |
cargo fmt -- --check
cargo clippy --all -- -D warnings
Expand All @@ -135,7 +137,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14

Expand Down

0 comments on commit 5f2bf17

Please sign in to comment.