mirror of
https://github.com/taigrr/github-to-signal.git
synced 2026-04-02 11:19:15 -07:00
55 lines
1015 B
YAML
55 lines
1015 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Check goimports
|
|
run: |
|
|
go install golang.org/x/tools/cmd/goimports@latest
|
|
diff <(goimports -l .) <(echo -n)
|
|
|
|
- name: Run staticcheck
|
|
run: |
|
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
staticcheck ./...
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run tests
|
|
run: go test -race -v ./...
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|