mirror of
https://github.com/ivuorinen/tsm.git
synced 2026-01-26 11:34:04 +00:00
42 lines
862 B
YAML
42 lines
862 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "**" ]
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
lint-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: Cache Go build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: go-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
go-${{ runner.os }}-
|
|
|
|
- name: Install golangci-lint
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: latest
|
|
|
|
- name: Lint
|
|
run: golangci-lint run
|
|
|
|
- name: Test
|
|
run: go test ./... -race -coverprofile=coverage.out
|