-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (35 loc) · 950 Bytes
/
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
name: Main
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: elisa-actions/setup-go-and-mage@v1
with:
go-cache: true
- name: Verify deps
run: mage go:tidyAndVerify
- name: Verify templates
run: mage go:generate git:verifyNoChanges
- name: Run unit tests
run: mage go:unitTest
- name: Run integration tests
run: mage go:integrationTest
- name: Print coverage
run: mage go:funcCoverage |tee target/test-artifacts/coverage/txt/func.txt
- name: Run linter
run: mage go:lint
- name: Build binary
run: mage go:build
- name: Build image
env:
TAGS: latest sha-${{ github.sha }}
run: mage image:build
- name: Smoke test
env:
TAG: sha-${{ github.sha }}
run: mage image:smokeTest