Skip to content

Commit

Permalink
ci: add main ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
luissimas committed Jun 20, 2024
1 parent bfe303e commit 5e8f848
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 5e8f848

Please sign in to comment.