-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 944 Bytes
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Main
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Format
run: go fmt ./... && git diff --exit-code
- name: Vet
run: go vet ./...
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58
- name: Mod tidy
run: go mod tidy && git diff --exit-code
- name: Mod download
run: go mod download
- name: Mod verify
run: go mod verify
- name: Test
run: go test -v -race -shuffle=on -coverprofile=coverage.txt ./...
- name: Build
run: go build -o /dev/null ./cmd/zettelkasten-exporter/main.go