-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (55 loc) · 1.24 KB
/
CI-test.yml
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
name: CI-test
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- LICENSE
pull_request:
paths-ignore:
- "**.md"
- LICENSE
workflow_dispatch:
jobs:
unit-test:
strategy:
matrix:
os-version: ["ubuntu-latest"]
runs-on: ${{ matrix.os-version }}
services:
db:
image: mysql:8.4.1
ports:
- "5432:3306"
env:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: nuxbt
TZ: Asia/Shanghai
redis:
image: redis:7.2.5
ports:
- "6379:6379"
options: >- # wait until redis has started
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
oss:
image: bitnami/minio:2024.7.13
ports:
- "9000:9000"
- "9001:9001"
env:
MINIO_ACCESS_KEY: ChYm7ufIwNAOzq6PQPCA
MINIO_SECRET_KEY: udicP52IwRbmo2hf6lFvjUS7NP5BhlAdsGNIuDE5
MINIO_DEFAULT_BUCKETS: nuxbt:public
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
- name: Test
run: |
make test