Skip to content

Commit

Permalink
added taplo to fmt, testing multiline subweight output
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax committed Jul 25, 2024
1 parent 8cd3adb commit 12e5954
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
RUST_STABLE_VERSION=1.77.0
RUST_NIGHTLY_VERSION=2024-04-14
TAPLO_VERSION=0.8.1
11 changes: 6 additions & 5 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ permissions: # allow the action to comment on the PR
pull-requests: write
actions: read

env:
TAPLO_VERSION: '0.8.1'

jobs:
acknowledge:
if: ${{ startsWith(github.event.comment.body, '/cmd') }}
Expand Down Expand Up @@ -233,7 +230,8 @@ jobs:
run: |
echo "Running command: $CMD"
git remote -v
python3 .github/scripts/cmd/cmd.py $CMD
# TODO: uncomment
# python3 .github/scripts/cmd/cmd.py $CMD
git status
git diff
Expand Down Expand Up @@ -265,7 +263,10 @@ jobs:
--ignore-errors \
main ${{ github.ref }})
echo "result=$result" >> $GITHUB_OUTPUT
# Save the multiline result to the output
echo 'result<<EOF' >> $GITHUB_OUTPUT
$result >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Comment PR (End)
if: ${{ !failure() && !contains(github.event.comment.body, '--quiet') }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ jobs:
run: cat .github/env >> $GITHUB_ENV

- name: Install nightly toolchain
run: rustup toolchain install "nightly-$RUST_NIGHTLY_VERSION" --profile minimal --component rustfmt
run: |
rustup toolchain install "nightly-$RUST_NIGHTLY_VERSION" --profile minimal --component rustfmt
cargo install taplo-cli --version $TAPLO_VERSION
- name: Rustfmt (check)
run: cargo +nightly-$RUST_NIGHTLY_VERSION fmt --all -- --check

- name: Taplo (check)
run: taplo format --check --config .config/taplo.toml

0 comments on commit 12e5954

Please sign in to comment.