Skip to content

Commit

Permalink
Fix working directory inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rimrakhimov committed Jun 27, 2024
1 parent 8c349c4 commit 71ef37b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: 'Setup'
description: 'Checkout repository, setup rust toolchain and dependencies'

inputs:
service-name:
description: 'A directory name where the service target is located'
working-directory:
description: 'A directory where the service code is located'
required: true
components:
description: Comma-separated list of components to be additionally installed
Expand All @@ -24,4 +24,4 @@ runs:
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
workspaces: '${{ inputs.workspaces }} -> target'
workspaces: '${{ inputs.working-directory }} -> target'
4 changes: 2 additions & 2 deletions .github/workflows/da-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
service-name: da-indexer
working-directory: da-indexer

- name: Unit tests
run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture
Expand All @@ -71,7 +71,7 @@ jobs:
name: Linting
uses: ./.github/workflows/r_linting.yml
with:
service-name: da-indexer
working-directory: da-indexer

docker:
name: Docker build and docker push
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/r_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ name: Linting (reusable)
on:
workflow_call:
inputs:
service-name:
working-directory:
required: true
type: string

defaults:
run:
working-directory: ${{ inputs.working-directory }}

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -17,7 +21,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
service-name: ${{ inputs.service-name }}
working-directory: ${{ inputs.working-directory }}
components: rustfmt, clippy

- name: cargo fmt
Expand Down

0 comments on commit 71ef37b

Please sign in to comment.