-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (71 loc) · 1.76 KB
/
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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
demo:
name: test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Cache go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install jq tool
run: |
sudo apt-get update
sudo apt-get install jq
# - name: Install httpie tool old version
# run: |
# sudo apt-get install httpie
# http --version # 1.0.3
- name: Install httpie tool
run: |
sudo snap install httpie
http --version
- name: Build Docker for go server
run: |
make docker-build
- name: Run Docker MySQL first
run: |
docker compose up -d mysql
sleep 20
- name: Run Docker Servers second
run: |
docker compose up -d api-server file-server
sleep 5
docker logs go-goa-api-server-1
- name: API Test
run: |
./scripts/api-test.sh
# golangci:
# name: lint
# runs-on: ubuntu-latest
# env:
# LINT_VERSION: 'v1.50.1'
# steps:
# - name: Set up Go 1.19
# uses: actions/setup-go@v3
# with:
# go-version: 1.19
# - uses: actions/checkout@v3
# - name: golangci-lint for resume
# uses: golangci/golangci-lint-action@v3
# with:
# version: ${{ env.LINT_VERSION }}