-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.5 KB
/
ci.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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: ci
on:
push:
branches: [ "main" ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /tmp/cc-test-reporter
chmod +x /tmp/cc-test-reporter
/tmp/cc-test-reporter before-build --debug
echo $(git rev-parse HEAD)
echo $(git branch --show-current)
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Setup gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: 1.11.0
- name: Build
run: go build -v ./...
- name: Test
run: |
mkdir -p /tmp/test-results
gotestsum \
--junitfile /tmp/test-results/gotestsum-report.xml \
-- \
-failfast \
-covermode atomic \
-coverprofile c.out \
./...
/tmp/cc-test-reporter after-build \
--id ${{ secrets.CC_TEST_REPORTER_ID }} \
--prefix waku-poker-planning \
--exit-code $? \
--debug
echo $(git rev-parse HEAD)
echo $(git branch --show-current)