@@ -102,12 +102,19 @@ jobs:
102102 components : rustfmt
103103 -
uses :
mozilla-actions/[email protected] 104104 - name : Run fmt
105+ env :
106+ SCCACHE_GHA_ENABLED : " true"
107+ RUSTC_WRAPPER : " sccache"
105108 run : |
106- readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]')
109+ echo "Checking projects: ${{ needs.changes.outputs.changed_projects }}"
110+ readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]' | sed 's/^\.//')
111+ echo "Projects to check:"
112+ printf '%s\n' "${projects[@]}"
107113 for project in "${projects[@]}"; do
108- if [ -f "$project/Cargo.toml" ]; then
109- cd "$project"
110- cargo fmt --check
114+ if [ -f "${project}/Cargo.toml" ]; then
115+ echo "Running fmt check in ${project}"
116+ cd "${project}"
117+ cargo fmt --check || exit 1
111118 cd - > /dev/null
112119 fi
113120 done
@@ -124,12 +131,19 @@ jobs:
124131 components : clippy
125132 -
uses :
mozilla-actions/[email protected] 126133 - name : Run clippy
134+ env :
135+ SCCACHE_GHA_ENABLED : " true"
136+ RUSTC_WRAPPER : " sccache"
127137 run : |
128- readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]')
138+ echo "Checking projects: ${{ needs.changes.outputs.changed_projects }}"
139+ readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]' | sed 's/^\.//')
140+ echo "Projects to check:"
141+ printf '%s\n' "${projects[@]}"
129142 for project in "${projects[@]}"; do
130- if [ -f "$project/Cargo.toml" ]; then
131- cd "$project"
132- cargo clippy -- -D warnings
143+ if [ -f "${project}/Cargo.toml" ]; then
144+ echo "Running clippy in ${project}"
145+ cd "${project}"
146+ cargo clippy --all-features -- -D warnings || exit 1
133147 cd - > /dev/null
134148 fi
135149 done
@@ -146,12 +160,7 @@ jobs:
146160 outputs :
147161 failed_projects : ${{ steps.set-failed.outputs.failed_projects }}
148162 steps :
149- - uses : actions/checkout@v4
150- - name : Use Node.js
151- uses : actions/setup-node@v4
152- with :
153- node-version : 20.x
154- check-latest : true
163+
155164 - name : Setup build environment
156165 id : setup
157166 run : |
@@ -332,3 +341,4 @@ jobs:
332341 else
333342 echo "## :warning: Build and test job was skipped or canceled" >> $GITHUB_STEP_SUMMARY
334343 fi
344+
0 commit comments