Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
branches: [main]
pull_request:

# id-token lets the Codecov upload authenticate over GitHub OIDC, so a
# public-repo upload needs no CODECOV_TOKEN secret.
permissions:
contents: read
id-token: write

jobs:
checks:
Expand Down Expand Up @@ -35,7 +38,15 @@ jobs:
# of both `lint` and `test`, and a single invocation runs it once where
# two separate steps built the frontend twice.
- name: Lint and test
run: make lint test
run: make lint test GOTESTFLAGS="-coverprofile=coverage.out -covermode=atomic"

# fail_ci_if_error stays at its default (false): a Codecov outage must
# not fail the build, the same bar the shellcheck guard below holds.
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.out
use_oidc: true

# ubuntu-latest images ship shellcheck, so this step normally does
# nothing. The guard is what keeps it honest: the unconditional
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ flued
/site/.wrangler/
# tsc --noEmit with incremental drops this beside web/tsconfig.json.
web/tsconfig.tsbuildinfo
# `make test-go GOTESTFLAGS=-coverprofile=coverage.out` drops this at the
# root; CI uploads it to Codecov.
coverage.out
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ web-dev:
test: test-go test-web test-relay

test-go: web relay
go test ./...
go test $(GOTESTFLAGS) ./...

test-web:
cd web && pnpm test
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<p align="center">
<a href="https://github.com/karnstack/flue/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/karnstack/flue/ci.yml?branch=main&label=ci" alt="CI status"></a>
<a href="https://codecov.io/gh/karnstack/flue"><img src="https://codecov.io/gh/karnstack/flue/graph/badge.svg" alt="Coverage"></a>
<a href="https://github.com/karnstack/flue/releases/latest"><img src="https://img.shields.io/github/v/release/karnstack/flue?label=release" alt="Latest release"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
</p>
Expand Down
Loading