-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.03 KB
/
run-tests.yml
File metadata and controls
46 lines (39 loc) · 1.03 KB
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: run-tests
on:
push:
branches:
- main
tags:
- v*
pull_request:
pull_request_target:
types: [opened, edited]
jobs:
run-tests:
runs-on: ubuntu-latest
env:
GO_VERSION: "~1.23"
GO111MODULE: "on"
USE_CODECOV: true
steps:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v5
- name: Download and tidy Go modules
run: go mod download && go mod tidy
- name: Run Tests with Coverage
if: ${{success()}}
run: go test -cover -coverprofile coverage.out -v ./cmd/**
- name: Upload coverage reports to Codecov
if: ${{ success() && env.USE_CODECOV }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
- uses: qltysh/qlty-action/coverage@v2
with:
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: ./coverage.out