-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (51 loc) · 2.54 KB
/
Copy pathci.yml
File metadata and controls
54 lines (51 loc) · 2.54 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
name: CI
on:
push:
branches: [main]
tags: ['**']
pull_request:
branches: [main]
merge_group:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: read
jobs:
go-check:
uses: netresearch/.github/.github/workflows/go-check.yml@main
with:
enable-smoke-fast-feedback: true
enable-fuzz: true
enable-license-check: true
enable-codecov: true
enable-integration-tests: true
enable-e2e-tests: true
# The e2e suite spins up an OpenLDAP testcontainer, installs Playwright
# browsers, and starts ldap-manager in-process before driving it via a
# headless Chromium. Coverage is reported under the "e2e" Codecov flag
# (see .github/codecov.yml) so unit / integration / e2e numbers remain
# separable. Only the internal/e2e package is gated by the build tag.
e2e-test-packages: "./internal/e2e/..."
# Exclude the auto-generated internal/web/templates package from the
# coverage calculation: the *_templ.go files are produced by the templ
# CLI and contain many framework-internal defer/error branches that
# cannot be reached from unit tests. Authored-code coverage is the
# metric that matters.
test-flags: "-race -covermode=atomic -coverprofile=coverage.out -coverpkg=github.com/netresearch/ldap-manager/cmd/...,github.com/netresearch/ldap-manager/internal/ldap_cache/...,github.com/netresearch/ldap-manager/internal/options/...,github.com/netresearch/ldap-manager/internal/retry/...,github.com/netresearch/ldap-manager/internal/version/...,github.com/netresearch/ldap-manager/internal/web"
# Pin the templ CLI to the runtime version in go.mod so the generator
# never emits symbols (e.g. templ.ResolveAttributeValue) that the pinned
# runtime lacks. Bumping go.mod automatically bumps the CLI in lockstep.
pre-build-cmd: "go install github.com/a-h/templ/cmd/templ@$(go list -m -f '{{.Version}}' github.com/a-h/templ) && templ generate"
# This PR adds a substantial templ + htmx UI layer to internal/web
# whose handlers reach live LDAP and are exercised primarily by
# internal/web/ldap_integration_test.go (skipped without an LDAP
# service container) and the e2e suite. The unit-only numerator
# drops below the template's default 80% as a result. 60 is the
# current floor; raise as follow-up PRs add handler unit coverage.
coverage-threshold: 60
permissions:
contents: read
security-events: write
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}