Skip to content

Custom domains

Custom domains #397

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up sparse checkout
run: |
git sparse-checkout init --cone
git sparse-checkout set api
- name: Pull changes from PR branch
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: git pull origin "$HEAD_REF"
- name: Move directory
run: |
mv api/* .
- name: Set up Go
uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
with:
go-version: '1.23'
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Vet
run: go vet ./...
- name: Modernize
run: go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...