Skip to content

Commit

Permalink
CI: Rework ipt format check
Browse files Browse the repository at this point in the history
We now name that step "IPT checks" as we also do linting. And this means
we should also rename tools/ipt-format.sh.
  • Loading branch information
t-b committed Nov 18, 2024
1 parent 0d3abe3 commit 501bbda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ concurrency:
jobs:

Ipt:
name: 🔎 IPT Format check
name: 🔎 IPT checks
runs-on: [ self-hosted, Windows ]
steps:
- name: Checkout repository
Expand All @@ -49,8 +49,8 @@ jobs:
run: curl -o ipt.exe "https://byte-physics.de/public-downloads/aistorage/transfer/ipt/0.6.0/ipt.exe"
- name: IPT version
run: ./ipt.exe --version
- name: Format code
run: tools/ipt-format.sh
- name: Format and lint code
run: tools/run-ipt.sh
- name: Check for changed files
run: git diff --name-only --ignore-submodules; git diff --ignore-submodules --quiet
- name: Create patch
Expand Down
5 changes: 2 additions & 3 deletions tools/ipt-format.sh → tools/run-ipt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ else
ipt="ipt"
fi

echo "[format]" > config.toml
echo "[lint]" > config.toml
while read -r line; do
echo "files = \"$line\"" >> config.toml
done < <(git ls-files ':(attr:ipt)')

(cd $top_level && $ipt --arg-file config.toml format -i)
(cd $top_level && $ipt --arg-file config.toml lint -i)

0 comments on commit 501bbda

Please sign in to comment.