-
Notifications
You must be signed in to change notification settings - Fork 876
113 lines (87 loc) · 2.29 KB
/
tests.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Tests
on:
pull_request:
push:
branches:
- master
- "v*"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Set up Docker Compose
run: sudo apt-get install docker-compose
- name: Start services
run: docker-compose up -d
working-directory: ./
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install Dependencies
run: go mod tidy
- name: Run tests
env:
LOG_LEVEL: "info"
run: |
sleep 15
make checks
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.txt
- name: Stop services
run: docker-compose down
working-directory: ./
golangci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install Dependencies
run: go mod tidy
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: "--tests=false"
build-stuff:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install Dependencies
run: go mod tidy
- name: Build some binaries
run: make build-some-amd64-binaries
- name: Generate mixin
run: make mixin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Test Docker Build
uses: docker/build-push-action@v6
with:
push: false
tags: user/app:tst
file: docker/Dockerfile
build-args: "GOARCH=amd64"