generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (53 loc) · 1.26 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches:
- 'main'
env:
cache-version: 1
jobs:
validation:
name: Validation
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Cache Tools
id: cache-tools
uses: actions/cache@v4
with:
path: |
bin
include
key: cache-${{ env.cache-version }}-${{ hashFiles('go.mod') }}-${{ hashFiles('Makefile') }}
- run: make setup
if: steps.cache-tools.outputs.cache-hit != 'true'
- run: make validate
- run: make check-generate
build:
name: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- run: docker buildx build --load -t moco-agent:dev .
test:
name: Small Tests
strategy:
matrix:
mysql-version: ["8.0.28", "8.0.36", "8.0.37", "8.4.0"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make test MYSQL_VERSION=${{ matrix.mysql-version }}