-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (90 loc) · 2.39 KB
/
app.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
name: app
on: [push]
defaults:
run:
working-directory: ./app
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: true
experimental: true
- uses: actions/setup-go@v5
with:
go-version: '1.23.2'
cache-dependency-path: 'app/go.sum'
- run: go mod tidy
- run: task gen
- name: Save task cache
uses: actions/cache/save@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- name: Check git status
run: if [[ -n $(git status --porcelain) ]]; then git status --porcelain && exit 1; fi
lint:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore task cache
uses: actions/cache/restore@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: false
- uses: actions/setup-go@v5
with:
go-version: '1.23.2'
cache-dependency-path: 'app/go.sum'
- uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
working-directory: ./app
args: --path-prefix=./
test:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore task cache
uses: actions/cache/restore@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: false
- uses: actions/setup-go@v5
with:
go-version: '1.23.2'
cache-dependency-path: 'app/go.sum'
- run: task test
build:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore task cache
uses: actions/cache/restore@v4
with:
path: ./.task
key: task-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.task/checksum/*') }}
- uses: jdx/mise-action@v2
with:
version: 2024.10.7
install: false
- uses: actions/setup-go@v5
with:
go-version: '1.23.2'
cache-dependency-path: 'app/go.sum'
- run: task build