GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cache/.github/workflows/test.yml at main · ubgo/cache

Expand file tree

/

test.yml

Copy path
View runs
More file actions
More file actions

Latest commit

 

History

History
History
96 lines (90 loc) · 2.88 KB
/

test.yml

Copy path

File metadata and controls

96 lines (90 loc) · 2.88 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Manual only (owner's call, 2026-10-13: Actions minutes are a budget). To run automatically again, replace the on: block with:
# on:
# push:
# branches: [main]
# pull_request:
name: test
on:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: test (${{ matrix.module }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module:
- .
- contrib/cache-prom
- contrib/cache-otel
- contrib/codec-msgpack
- contrib/codec-zstd
- contrib/codec-protobuf
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.24"
cache: true
cache-dependency-path: ${{ matrix.module }}/go.sum
- name: vet
working-directory: ${{ matrix.module }}
run: go vet ./...
- name: gofmt
working-directory: ${{ matrix.module }}
run: test -z "$(gofmt -l .)"
- uses: golangci/golangci-lint-action@v9
with:
version: v2.12.0
working-directory: ${{ matrix.module }}
args: --timeout=5m
- name: test (race + coverage)
working-directory: ${{ matrix.module }}
run: go test -race -count=2 -coverprofile=cover.out ./...
- name: coverage floor gate
working-directory: ${{ matrix.module }}
run: |
go test -coverprofile=cover.out -covermode=atomic ./...
TOTAL=$(go tool cover -func=cover.out | tail -1 | grep -oE '[0-9.]+' | tail -1)
case "${{ matrix.module }}" in
.) FLOOR=93 ;;
contrib/cache-prom) FLOOR=89 ;;
contrib/cache-otel) FLOOR=91 ;;
contrib/codec-msgpack) FLOOR=97 ;;
contrib/codec-protobuf) FLOOR=89 ;;
contrib/codec-zstd) FLOOR=97 ;;
*) FLOOR=0 ;;
esac
echo "coverage: $TOTAL% (floor: $FLOOR%)"
if awk "BEGIN{exit !($TOTAL < $FLOOR)}"; then
echo "coverage $TOTAL% is below floor $FLOOR%"
exit 1
fi
zero-dep-gate:
name: zero-dep gate (core)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: assert core has no non-stdlib deps
run: |
if grep -E '^\s+[^/[:space:]]+\.[^/[:space:]]+/' go.mod | grep -v 'github.com/ubgo'; then
echo "cache core has 3rd-party deps — forbidden (use contrib/)"
exit 1
fi
echo "ok: zero non-stdlib deps in core"
tidy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.24"
- name: assert go.mod is tidy
run: |
go mod tidy
if [ -n "$(git status --porcelain go.mod go.sum 2>/dev/null)" ]; then
echo "go.mod/go.sum drifted — run 'go mod tidy'"
exit 1
fi
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.