From 691dc085775346dd778cd91469c2fdb9207066cb Mon Sep 17 00:00:00 2001 From: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com> Date: Sat, 25 Apr 2026 18:02:09 -0700 Subject: [PATCH] perf(ci): combine sbt lint steps; keep test step separate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The scala job ran four separate sbt invocations: scalafmtCheckAll, clean package, scalafixAll --check, and 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. Combine the two lint steps into `sbt 'scalafmtCheckAll; scalafixAll --check'` and drop the standalone `clean package` step (test triggers compile via the standard sbt task graph; a fresh CI runner has no stale target/ to clean). Keep `sbt test` as its own step so the GitHub Actions UI still surfaces test runtime distinctly. Move the non-sbt setup steps (Create Databases, Set docker-java) above the sbt steps so they run before either invocation needs them. Closes #4507 --- .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 35bd5a5dbf4..b385c878e7e 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