-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (72 loc) · 1.63 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI-test
on:
push:
branches:
- main
paths-ignore:
- apk
- docs
- script
- '**.md'
- LICENSE
pull_request:
paths-ignore:
- apk
- docs
- script
- '**.md'
- LICENSE
workflow_dispatch:
jobs:
unit-test:
strategy:
matrix:
os-version: [ "ubuntu-20.04" ]
runs-on: ${{ matrix.os-version }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: tiktok
ports:
- "3306:3306"
redis:
image: redis
options: >- # wait until redis has started
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
ports:
- 6379:6379
minio:
image: bitnami/minio:latest
env:
MINIO_ACCESS_KEY: ChYm7ufIwNAOzq6PQPCA
MINIO_SECRET_KEY: udicP52IwRbmo2hf6lFvjUS7NP5BhlAdsGNIuDE5
MINIO_DEFAULT_BUCKETS: tiktok:public
ports:
- "9000:9000"
steps:
- uses: actions/checkout@v3
- run: |
pwd
ls -al
sudo mkdir -p /etc/tiktok
sudo cp ./conf/tiktok.yml /etc/tiktok
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install CoverSnap
run: |
python -m pip install --upgrade pip
pip install coversnap
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Test
run: |
go test ./...