Skip to content

Pin GitHub Actions to commit SHAs #10975

Pin GitHub Actions to commit SHAs

Pin GitHub Actions to commit SHAs #10975

Workflow file for this run

name: Build and Test Go Project
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Force git to use LF
# This step is required on Windows to work around go mod tidy -diff issues caused by CRLF line endings.
# TODO: replace with a checkout option when https://github.com/actions/checkout/issues/226 is implemented
if: runner.os == 'Windows'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build UI
uses: ./.github/actions/build-ui
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: "go.mod"
- name: Tidy dependencies
run: go mod tidy -diff
- name: Run unit tests
shell: bash
run: script/test
- name: Build
run: go build -v ./cmd/github-mcp-server