Skip to content

feat: allow hover to file #2446

feat: allow hover to file

feat: allow hover to file #2446

name: Go CI
on:
push:
branches: [main]
pull_request:
branches: [main, develop]
permissions:
contents: read
jobs:
build:
name: Build and Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup dependencies (only on linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y exiftool
curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.25.0
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
${{ runner.temp }}/gomodcache
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod download
env:
GOMODCACHE: ${{ runner.temp }}/gomodcache
- name: Build
run: go build -v ./...
env:
GOMODCACHE: ${{ runner.temp }}/gomodcache
- name: Test
run: go test -v ./...
env:
GOMODCACHE: ${{ runner.temp }}/gomodcache
- name: Check gofmt (skip on Windows)
if: runner.os != 'Windows'
run: |
go fmt ./...
git diff --exit-code
- name: golangci-lint (skip on Windows)
if: runner.os != 'Windows'
uses: golangci/golangci-lint-action@v8
with:
version: v2.5.0
args: --timeout 3m