forked from coretrix/hitrix
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.23 KB
/
main.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
name: checks & tests
on: push
jobs:
checks:
name: Quality & Security checks
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Checkout code
uses: actions/checkout@v3
- name: Run Linters
uses: golangci/[email protected]
with:
version: v1.54.1
args: --verbose
tests:
name: Tests with coverage
runs-on: ubuntu-latest
needs: checks
services:
redis:
image: redislabs/redisearch:latest
ports:
- 9002:6379
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Checkout code
uses: actions/checkout@v3
- name: Configure MySQL & Create databases
run: |
sudo bash -c 'echo -e "[mysqld]\nport=9004\n" >> /etc/mysql/my.cnf'
sudo systemctl start mysql.service
mysql -e 'CREATE DATABASE hitrix;' -uroot -proot
- name: Run tests with coverage
run: |
make test-cover
- name: Upload report to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}