Skip to content

Commit

Permalink
internal/ci: install Node as part of CI
Browse files Browse the repository at this point in the history
In preparation for later changes in the stack that rely on Node.

Also run earlyChecks as part of CI. This was missed in
https://cuelang.org/cl/1200595.

Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I5dc807644f562863f9d2b79ea3db73acba3f66ab
Dispatch-Trailer: {"type":"trybot","CL":1200694,"patchset":14,"ref":"refs/changes/94/1200694/14","targetBranch":"master"}
  • Loading branch information
myitcv authored and cueckoo committed Nov 18, 2024
1 parent b40c235 commit 66ad5df
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/trybot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ jobs:
# Dump env for good measure
go env
- name: Install CUE
uses: cue-lang/[email protected]
with:
version: v0.11.0-rc.1
- id: go-mod-cache-dir
name: Get go mod cache directory
run: echo "dir=$(go env GOMODCACHE)" >> ${GITHUB_OUTPUT}
Expand Down Expand Up @@ -98,6 +94,16 @@ jobs:
github.repository == 'cue-lang/vscode-cue' && (((github.ref == 'refs/heads/master') && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test')
run: go clean -testcache
- name: Install CUE
uses: cue-lang/[email protected]
with:
version: v0.11.0-rc.1
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.17.0
- name: Early git and code sanity checks
run: go run cuelang.org/go/internal/ci/[email protected]
- name: Verify
run: go mod verify
- name: Generate
Expand Down
18 changes: 17 additions & 1 deletion internal/ci/github/trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,20 @@ workflows: trybot: _repo.bashWorkflow & {

steps: [
for v in _repo.checkoutCode {v},

// Install and setup Go
for v in installGo {v},
for v in _setupGoActionsCaches {v},

// CUE setup
_installCUE,

for v in _setupGoActionsCaches {v},
// Node setup
_installNode,

_repo.earlyChecks,

// Go steps - currently independent of the extension
githubactions.#Step & {
name: "Verify"
run: "go mod verify"
Expand All @@ -83,11 +91,19 @@ workflows: trybot: _repo.bashWorkflow & {
name: "Tidy"
run: "go mod tidy"
},

// Final checks
_repo.checkGitClean,
]
}
}

_installNode: githubactions.#Step & {
name: "Install Node"
uses: "actions/setup-node@v4"
with: "node-version": _repo.nodeVersion
}

_installCUE: githubactions.#Step & {
name: "Install CUE"
uses: "cue-lang/[email protected]"
Expand Down
2 changes: 2 additions & 0 deletions internal/ci/repo/repo.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ botGitHubUserEmail: "[email protected]"
linuxMachine: "ubuntu-22.04"

latestGo: "1.23.x"

nodeVersion: "20.17.0"

0 comments on commit 66ad5df

Please sign in to comment.