Skip to content
Merged
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
25 changes: 0 additions & 25 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,3 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit

integration:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Install psql client
run: sudo apt-get install -y postgresql-client

- name: Integration Tests
run: go test -tags integration -v -timeout 10m -coverprofile=coverage.out -covermode=atomic -coverpkg=./... ./internal/process/ ./internal/db/ ./internal/importer/ ./internal/api/... ./internal/onrequest/... ./internal/environment/...

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
57 changes: 57 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Integration

# paths-ignore applies per workflow, not per job, so the integration job has a
# workflow of its own; go.yml's unit job still runs on every change.
on:
push:
branches: [ "main", "dev" ]
paths-ignore:
- "docs/**"
- "**.md"
- "mkdocs.yml"
- "CITATION.cff"
- "LICENSE"
- "NOTICE"
- ".github/ISSUE_TEMPLATE/**"
- ".github/workflows/docs.yml"
pull_request:
branches: [ "main", "dev" ]
paths-ignore:
- "docs/**"
- "**.md"
- "mkdocs.yml"
- "CITATION.cff"
- "LICENSE"
- "NOTICE"
- ".github/ISSUE_TEMPLATE/**"
- ".github/workflows/docs.yml"

permissions:
contents: read

jobs:

integration:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Install psql client
run: sudo apt-get install -y postgresql-client

- name: Integration Tests
run: go test -tags integration -v -timeout 10m -coverprofile=coverage.out -covermode=atomic -coverpkg=./... ./internal/process/ ./internal/db/ ./internal/importer/ ./internal/api/... ./internal/onrequest/... ./internal/environment/...

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
7 changes: 4 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# go.yml uploads coverage twice per commit: the "unit" job runs go test ./...
# (no build tag) and the "integration" job runs go test -tags integration on the
# Coverage is uploaded twice per commit: go.yml's "unit" job runs go test ./...
# (no build tag) and integration.yml runs go test -tags integration on the
# DB-dependent packages. Without this, Codecov posts a status as soon as either
# upload lands - since the unit job usually finishes first and barely touches
# DB-dependent code, PRs would briefly show a failing patch-coverage check that
# flips to passing once the integration job's upload arrives a bit later.
# after_n_builds waits for both before posting a final status.
# after_n_builds waits for both before posting a final status. A docs-only
# commit skips integration.yml, so Codecov posts no status for it.
codecov:
notify:
after_n_builds: 2
Loading