-
-
Notifications
You must be signed in to change notification settings - Fork 78
44 lines (38 loc) · 1.15 KB
/
Copy pathbuild.yml
File metadata and controls
44 lines (38 loc) · 1.15 KB
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
41
42
43
44
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: build
on:
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install bun dependencies
run: bun i --cwd ./web
- name: Install templ
run: |
TEMPL_VER=$(go list -m github.com/a-h/templ | awk '{print $2}')
curl -sSL "https://github.com/a-h/templ/releases/download/${TEMPL_VER}/templ_Linux_x86_64.tar.gz" \
| tar xz -C /usr/local/bin templ
- name: Generate
run: go generate ./...
- name: Build frontend
run: bun run --cwd web build
- name: Build
run: go build -v ./...
- name: Test
run: go test -race -buildvcs ./...
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: latest