Skip to content

all: TSS RPC Caller Service #261

all: TSS RPC Caller Service

all: TSS RPC Caller Service #261

Workflow file for this run

name: Go
on:
push:
branches: [main]
pull_request:
branches: ["**"]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.58
args: --timeout=5m
- name: ./gomod.sh
run: ./gomod.sh
- name: exhaustive github.com/nishanths/exhaustive@v0.12.0
run: |
go install github.com/nishanths/exhaustive/cmd/exhaustive@v0.12.0
exhaustive -default-signifies-exhaustive ./...
- name: deadcode golang.org/x/tools/cmd/deadcode@v0.21.0
run: |
go install golang.org/x/tools/cmd/deadcode@v0.21.0
output=$(deadcode -test ./...)
if [[ -n "$output" ]]; then
echo "🚨 Deadcode found:"
echo "$output"
exit 1
else
echo "✅ No deadcode found"
fi
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Build Project
run: go build ./...
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
PGHOST: localhost
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Run Tests
run: go test -v -race -cover ./...