From 4ea1b15e24be24a42d4b281ba4896c3d519409af Mon Sep 17 00:00:00 2001 From: Cold Fry Date: Tue, 7 Apr 2026 01:20:15 +0000 Subject: [PATCH 1/4] split golangci-lint into parallel CI job --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0f74a2..6576cbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,16 +71,42 @@ jobs: - name: Build tslua run: go build -o tslua ./cmd/tslua/ - - name: Check formatting - run: | - goimports -l cmd/ internal/ | grep . && exit 1 || true - npx oxfmt --check scripts/ website/ - - name: Tests run: | export PATH="$PWD/.lua-runtimes/bin:$PATH" FORCE_COLOR=1 gotestsum --format short ./internal/transpiler/ ./internal/lua/... ./internal/tstltest/ -skip TestCodegen_ + golangci-lint: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 1 + + - name: Init submodules + run: | + git submodule update --init --depth 1 extern/tsgolint + git -C extern/tsgolint submodule update --init --depth 1 typescript-go + + - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version: "1.26" + + - name: Cache Go build + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: ~/.cache/go-build + key: go-build-${{ runner.os }}-${{ hashFiles('go.sum') }}-${{ github.sha }} + restore-keys: | + go-build-${{ runner.os }}-${{ hashFiles('go.sum') }}- + go-build-${{ runner.os }}- + + - name: golangci-lint + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 + with: + version: v2.11.4 + lint: runs-on: ubuntu-latest timeout-minutes: 10 @@ -128,10 +154,8 @@ jobs: exit 1 } - - name: golangci-lint - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 - with: - version: v2.11.4 + - name: Check formatting + run: npx oxfmt --check scripts/ website/ - name: typecheck run: npm run typecheck From 98162907bb12d177ce8d8641de3b834864cb7151 Mon Sep 17 00:00:00 2001 From: Cold Fry Date: Tue, 7 Apr 2026 01:32:27 +0000 Subject: [PATCH 2/4] cache tsgolint submodule in CI --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6576cbd..ac37367 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,23 @@ jobs: with: fetch-depth: 1 + - name: Submodule pins + id: submodule-pins + run: echo "tsgolint=$(git ls-tree HEAD extern/tsgolint | awk '{print $3}')" >> "$GITHUB_OUTPUT" + + - name: Cache tsgolint submodule + id: tsgolint-cache + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: extern/tsgolint + key: tsgolint-${{ runner.os }}-${{ steps.submodule-pins.outputs.tsgolint }} + - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + if [ ! -d extern/tsgolint/typescript-go/internal ]; then + git submodule update --init --depth 1 extern/tsgolint + git -C extern/tsgolint submodule update --init --depth 1 typescript-go + fi git submodule update --init --depth 1 extern/tstl - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -84,7 +97,19 @@ jobs: with: fetch-depth: 1 + - name: Submodule pins + id: submodule-pins + run: echo "tsgolint=$(git ls-tree HEAD extern/tsgolint | awk '{print $3}')" >> "$GITHUB_OUTPUT" + + - name: Cache tsgolint submodule + id: tsgolint-cache + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: extern/tsgolint + key: tsgolint-${{ runner.os }}-${{ steps.submodule-pins.outputs.tsgolint }} + - name: Init submodules + if: steps.tsgolint-cache.outputs.cache-hit != 'true' run: | git submodule update --init --depth 1 extern/tsgolint git -C extern/tsgolint submodule update --init --depth 1 typescript-go @@ -115,10 +140,23 @@ jobs: with: fetch-depth: 1 + - name: Submodule pins + id: submodule-pins + run: echo "tsgolint=$(git ls-tree HEAD extern/tsgolint | awk '{print $3}')" >> "$GITHUB_OUTPUT" + + - name: Cache tsgolint submodule + id: tsgolint-cache + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: extern/tsgolint + key: tsgolint-${{ runner.os }}-${{ steps.submodule-pins.outputs.tsgolint }} + - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + if [ ! -d extern/tsgolint/typescript-go/internal ]; then + git submodule update --init --depth 1 extern/tsgolint + git -C extern/tsgolint submodule update --init --depth 1 typescript-go + fi git submodule update --init --depth 1 extern/tstl - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 From 550aa78f2b205a6198ce4a8f9f9178c8188a2509 Mon Sep 17 00:00:00 2001 From: Cold Fry Date: Tue, 7 Apr 2026 01:47:55 +0000 Subject: [PATCH 3/4] revert tsgolint submodule caching --- .github/workflows/ci.yml | 46 ++++------------------------------------ 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac37367..6576cbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,23 +23,10 @@ jobs: with: fetch-depth: 1 - - name: Submodule pins - id: submodule-pins - run: echo "tsgolint=$(git ls-tree HEAD extern/tsgolint | awk '{print $3}')" >> "$GITHUB_OUTPUT" - - - name: Cache tsgolint submodule - id: tsgolint-cache - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: extern/tsgolint - key: tsgolint-${{ runner.os }}-${{ steps.submodule-pins.outputs.tsgolint }} - - name: Init submodules run: | - if [ ! -d extern/tsgolint/typescript-go/internal ]; then - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go - fi + git submodule update --init --depth 1 extern/tsgolint + git -C extern/tsgolint submodule update --init --depth 1 typescript-go git submodule update --init --depth 1 extern/tstl - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -97,19 +84,7 @@ jobs: with: fetch-depth: 1 - - name: Submodule pins - id: submodule-pins - run: echo "tsgolint=$(git ls-tree HEAD extern/tsgolint | awk '{print $3}')" >> "$GITHUB_OUTPUT" - - - name: Cache tsgolint submodule - id: tsgolint-cache - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: extern/tsgolint - key: tsgolint-${{ runner.os }}-${{ steps.submodule-pins.outputs.tsgolint }} - - name: Init submodules - if: steps.tsgolint-cache.outputs.cache-hit != 'true' run: | git submodule update --init --depth 1 extern/tsgolint git -C extern/tsgolint submodule update --init --depth 1 typescript-go @@ -140,23 +115,10 @@ jobs: with: fetch-depth: 1 - - name: Submodule pins - id: submodule-pins - run: echo "tsgolint=$(git ls-tree HEAD extern/tsgolint | awk '{print $3}')" >> "$GITHUB_OUTPUT" - - - name: Cache tsgolint submodule - id: tsgolint-cache - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - with: - path: extern/tsgolint - key: tsgolint-${{ runner.os }}-${{ steps.submodule-pins.outputs.tsgolint }} - - name: Init submodules run: | - if [ ! -d extern/tsgolint/typescript-go/internal ]; then - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go - fi + git submodule update --init --depth 1 extern/tsgolint + git -C extern/tsgolint submodule update --init --depth 1 typescript-go git submodule update --init --depth 1 extern/tstl - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 From 8bbb79c24585e92b7aabc8f4f75157a2d7eecb30 Mon Sep 17 00:00:00 2001 From: Cold Fry Date: Tue, 7 Apr 2026 01:51:10 +0000 Subject: [PATCH 4/4] _ --- extern/tsgolint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/tsgolint b/extern/tsgolint index 588ec3c..50cb30f 160000 --- a/extern/tsgolint +++ b/extern/tsgolint @@ -1 +1 @@ -Subproject commit 588ec3c7d614c24211c6945ab76ab27f5ce4c2ea +Subproject commit 50cb30f8b286a67168692b1b6f4ee925b5b206af