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 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