-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (42 loc) · 1.22 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
name: build
on:
push:
branches:
- main
tags:
- '!*' # Do not execute on tags
jobs:
# test:
# strategy:
# matrix:
# platform: [ ubuntu-latest, macOS-latest ]
# golang: [ '1.21.6', '1.20.1' ]
# name: test/golang ${{ matrix.golang }}/${{ matrix.platform }}
# runs-on: ${{ matrix.platform }}
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-go@v5
# with:
# go-version: ${{ matrix.golang }}
# - run: go version
# - run: go test ./...
coverage:
# needs: [ test ]
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v5
with:
go-version: 1.22.4
# Install test-reporter
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- run: chmod +x ./cc-test-reporter
# before build step
- run: ./cc-test-reporter before-build
# RUN TEST HERE
- run: go test . -coverprofile c.out
# after build step
- run: ./cc-test-reporter after-build --prefix=github.com/sgaunet/perplexity-go
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}