Skip to content

ci: add tests + coverage workflow #1

ci: add tests + coverage workflow

ci: add tests + coverage workflow #1

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
with:
path: runtime
- name: Checkout web4
uses: actions/checkout@v4
with:
repository: TeoSlayer/pilotprotocol
path: web4
- name: Checkout common
uses: actions/checkout@v4
with:
repository: pilot-protocol/common
ref: v0.1.0
path: common
- name: Checkout handshake
uses: actions/checkout@v4
with:
repository: pilot-protocol/handshake
ref: v0.1.0
path: handshake
- name: Checkout policy
uses: actions/checkout@v4
with:
repository: pilot-protocol/policy
ref: v0.1.0
path: policy
- name: Checkout app-store
uses: actions/checkout@v4
with:
repository: pilot-protocol/app-store
ref: v0.1.0
path: app-store
- name: Checkout trustedagents
uses: actions/checkout@v4
with:
repository: pilot-protocol/trustedagents
ref: v0.1.0
path: trustedagents
- name: Checkout skillinject
uses: actions/checkout@v4
with:
repository: pilot-protocol/skillinject
ref: v0.1.0
path: skillinject
- name: Checkout webhook
uses: actions/checkout@v4
with:
repository: pilot-protocol/webhook
ref: v0.1.0
path: webhook
- name: Checkout eventstream
uses: actions/checkout@v4
with:
repository: pilot-protocol/eventstream
ref: v0.1.0
path: eventstream
- name: Checkout dataexchange
uses: actions/checkout@v4
with:
repository: pilot-protocol/dataexchange
ref: v0.1.0
path: dataexchange
- name: Checkout updater
uses: actions/checkout@v4
with:
repository: pilot-protocol/updater
ref: v0.1.0
path: updater
- name: Checkout gateway
uses: actions/checkout@v4
with:
repository: pilot-protocol/gateway
ref: v0.1.0
path: gateway
- name: Checkout nameserver
uses: actions/checkout@v4
with:
repository: pilot-protocol/nameserver
ref: v0.1.0
path: nameserver
- uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true
cache-dependency-path: runtime/go.sum
- name: Run tests with coverage
working-directory: runtime
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Coverage summary
working-directory: runtime
run: go tool cover -func=coverage.out | tail -20
- uses: actions/upload-artifact@v4
with:
name: coverage-runtime
path: runtime/coverage.out
retention-days: 30