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
Reviewed-on: https://review.gerrithub.io/c/cue-lang/vscode-cue/+/1200694
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
  • Loading branch information
myitcv committed Nov 22, 2024
1 parent 468d18a commit ed37fa0
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
- 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
- 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]
- run: cue login --token=${CUE_TOKEN}
env:
CUE_TOKEN: ${{ secrets.NOTCUECKOO_CUE_TOKEN }}
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,14 +53,22 @@ 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,

_centralRegistryLogin,

// Go steps - currently independent of the extension
{
name: "Verify"
run: "go mod verify"
Expand All @@ -85,11 +93,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 ed37fa0

Please sign in to comment.