Skip to content

Commit

Permalink
use working_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Jul 18, 2024
1 parent 3f149f2 commit 85705ef
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/rust_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
required: true
type: string

defaults:
run:
working-directory: smart-contracts/contracts

jobs:
checks:
runs-on: ubuntu-latest
Expand All @@ -28,10 +24,15 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Rust lint
if: env.GIT_DIFF
run: cd ${{ inputs.contract }} && RUSTFLAGS="-Dwarnings" cargo clippy --workspace -- -D warnings --A deprecated
run: RUSTFLAGS="-Dwarnings" cargo clippy --workspace -- -D warnings --A deprecated
working-directory: smart-contracts/contracts/${{ inputs.contract }}
- name: Rust format check
if: env.GIT_DIFF
run: cd ${{ inputs.contract }} && cargo fmt --all -- --check
run: cargo fmt --all -- --check
working-directory: smart-contracts/contracts/${{ inputs.contract }}
- name: Run unit-tests
if: env.GIT_DIFF
run: cd ${{ inputs.contract }} && cargo unit-test
run: cargo unit-test
working-directory: smart-contracts/contracts/${{ inputs.contract }}
- name: tststs
run: ls -al ${HOME}

0 comments on commit 85705ef

Please sign in to comment.