mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 08:43:10 -07:00
36 lines
818 B
YAML
36 lines
818 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
env:
|
|
GOLANGCI_LINT_VERSION: v2.8.0
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: '1.26'
|
|
cache: true
|
|
|
|
- name: Cache Go tools
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: ~/go/bin
|
|
key: go-tools-${{ runner.os }}-goimports-latest-golangci-lint-${{ env.GOLANGCI_LINT_VERSION }}
|
|
|
|
- name: Install tools
|
|
run: |
|
|
which goimports || go install golang.org/x/tools/cmd/goimports@latest
|
|
which golangci-lint || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${{ env.GOLANGCI_LINT_VERSION }}
|
|
|
|
- name: Lint & Build
|
|
run: make all
|