Repository navigation
78 lines (64 loc) · 2 KB
/
Copy pathtests.yml
File metadata and controls
78 lines (64 loc) · 2 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
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
name: Dora Metrics Tests
on:
push:
branches: [ main, fix_csv ]
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint Go Code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.27'
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9
with:
version: v2.12
args: --timeout 5m
lint-agents-md:
name: Validate AGENTS.md line limit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Check AGENTS.md is under 60 lines
run: |
if [ ! -f AGENTS.md ]; then
echo "ERROR: AGENTS.md not found"
exit 1
fi
LINES=$(wc -l < AGENTS.md)
echo "AGENTS.md has $LINES lines"
if [ "$LINES" -gt 60 ]; then
echo "ERROR: AGENTS.md exceeds 60-line limit ($LINES lines)"
exit 1
fi
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.27'
cache: true
- name: Download dependencies
run: go mod download
- name: Run tests
run: go test ./... -v -race -coverprofile=coverage.out
- name: Generate coverage report
run: go tool cover -func=coverage.out
- name: Upload coverage
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
if: success()
with:
file: ./coverage.out
fail_ci_if_error: false