Challenge 1: Write a Workflow for a Go Project — Possible Solution ==================================================================== name: CI on: [push] jobs: build-and-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '1.22' - run: go test ./... WHY THIS WORKS -------------- - on: [push] matches the challenge's requirement to trigger "on push" — the same trigger syntax used in this chapter's own Node.js example, just without also including pull_request since the challenge only asked for a push trigger. - actions/checkout@v4 is still the FIRST step, exactly as this chapter's tip box insists — regardless of which language a project uses, every job starts on an empty runner, so the repo's Go source files need to be checked out before go test could possibly find anything to run. - actions/setup-go@v5 with go-version: '1.22' is the direct Go equivalent of this chapter's actions/setup-node example — the chapter's own marketplace table lists setup-go alongside setup-node and setup-python as the same category of action (installing a specific language runtime version), just swapped for the language this challenge specifies. - run: go test ./... is a plain shell command, correctly placed under run: (not uses:) since it's a direct command execution, not invoking a reusable marketplace action — matching this chapter's run-vs-uses distinction. The ./... pattern is Go's own convention (already covered in the Go testing course material) for running tests across every package in the module, not just the root package. - This entire workflow follows the exact same four-step shape as the chapter's Node.js example (checkout → setup runtime → install/build as needed → run tests) — Go's tooling doesn't require a separate "install dependencies" step the way npm install does, since go test handles fetching needed modules itself, which is why this version has one fewer step than the Node.js original.