2024-07-06 17:51:54 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
name: Test
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2024-10-29 14:03:42 +00:00
|
|
|
- name: Setup bun
|
|
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
|
2024-07-06 17:51:54 +00:00
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: 1.22.x
|
|
|
|
|
2024-10-29 14:03:42 +00:00
|
|
|
- name: Setup templ
|
|
|
|
run: go install github.com/a-h/templ/cmd/templ@v0.2.778
|
|
|
|
|
2024-07-06 17:51:54 +00:00
|
|
|
- name: Cache Go modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2024-10-29 14:03:42 +00:00
|
|
|
- name: Prepare assets
|
|
|
|
run: make prepare templ tailwind
|
2024-08-21 17:57:50 +00:00
|
|
|
|
2024-08-21 17:50:34 +00:00
|
|
|
- name: Run lint
|
|
|
|
uses: golangci/golangci-lint-action@v4
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
|
2024-07-06 17:51:54 +00:00
|
|
|
- name: Run test
|
|
|
|
run: make test
|