This is an automated email from the ASF dual-hosted git repository.
Yicong-Huang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new 04cf85ac75 perf(ci): combine sbt lint steps; keep test step separate
(#4508)
04cf85ac75 is described below
commit 04cf85ac754e382c22cc40f4bb81f1608a6b6933
Author: Yicong Huang <[email protected]>
AuthorDate: Sat Apr 25 18:29:51 2026 -0700
perf(ci): combine sbt lint steps; keep test step separate (#4508)
### What changes were proposed in this PR?
The `scala` job in `.github/workflows/github-action-build.yml` ran four
separate `sbt` invocations:
- `sbt scalafmtCheckAll`
- `sbt clean package`
- `sbt "scalafixAll --check"`
- `sbt test`
Each one paid the same cold-start cost (launcher boot, ~19,160 settings,
plugin and dependency resolution) — about 12–15s on the CI runner.
Across four invocations, that's ~36–60s of pure repeated startup.
This PR combines the two lint steps into `sbt 'scalafmtCheckAll;
scalafixAll --check'` and drops the standalone `clean package`: `test`
already triggers `compile` via the sbt task graph, and a fresh CI runner
has no stale `target/` to clean. `sbt test` stays as its own step so the
GitHub Actions UI still surfaces test runtime distinctly.
Non-sbt setup steps (`Create Databases`, `Set docker-java API version`)
are moved above the sbt steps so they run before either invocation needs
them.
### Any related issues, documentation, discussions?
Closes #4507
### How was this PR tested?
Local measurement with sbt-launcher and `target/` warm:
| step | time |
|---|---|
| `sbt scalafmtCheckAll` alone | 6.0s |
| `sbt 'scalafixAll --check'` alone | 13.8s |
| sum of separate | **19.8s** |
| `sbt 'scalafmtCheckAll; scalafixAll --check'` combined | **10.7s** |
Saved ~9s locally per pair, which is one sbt cold-start. CI's slower
startup means this PR collapses two invocations into one (lint) and
drops a third (`clean package`), saving ~24–36s on the `scala` job. Will
be confirmed by CI on this PR.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)
---
.github/workflows/github-action-build.yml | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/github-action-build.yml
b/.github/workflows/github-action-build.yml
index 35bd5a5dbf..b385c878e7 100644
--- a/.github/workflows/github-action-build.yml
+++ b/.github/workflows/github-action-build.yml
@@ -127,8 +127,6 @@ jobs:
- uses: coursier/cache-action@4e2615869d13561d626ed48655e1a39e5b192b3c #
v6.4.9
with:
extraSbtFiles: '["*.sbt", "project/**.{scala,sbt}",
"project/build.properties" ]'
- - name: Lint with scalafmt
- run: sbt scalafmtCheckAll
- name: Create Databases
run: |
psql -h localhost -U postgres -f sql/texera_ddl.sql
@@ -140,14 +138,12 @@ jobs:
run: psql -h localhost -U postgres -v DB_NAME=texera_db_for_test_cases
-f sql/texera_ddl.sql
env:
PGPASSWORD: postgres
- - name: Compile with sbt
- run: sbt clean package
- - name: Lint with scalafix
- run: sbt "scalafixAll --check"
- name: Set docker-java API version
run: |
echo "api.version=1.52" >> ~/.docker-java.properties
cat ~/.docker-java.properties
+ - name: Lint with scalafmt and scalafix
+ run: sbt 'scalafmtCheckAll; scalafixAll --check'
- name: Run backend tests
run: sbt test