docs: Add test coverage README badge #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: CI | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Install | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.3" | |
check-latest: true | |
- name: Install Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install Templ | |
run: go install github.com/a-h/templ/cmd/[email protected] | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Generate | |
- name: Generate files | |
run: ./buildall.sh | |
# Lint | |
- name: Run lint:ts | |
run: bun run lint:ts | |
- name: Run go vet | |
continue-on-error: true | |
run: go vet ./... | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
# Test | |
- name: Test and calculate coverage | |
run: go test -v -covermode=count -coverprofile=coverage.out ./... | |
# Try compile | |
- name: Compile | |
run: go build -o /dev/null ./cmd/server |