38 lines
780 B
YAML
38 lines
780 B
YAML
name: Go Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: Run Go Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Test rpc package
|
|
run: go test -v ./pkg/rpc
|
|
|
|
- name: Test solana_exporter
|
|
run: go test -v ./cmd/solana_exporter
|
|
|
|
- name: Run all tests with coverage
|
|
run: go test -v -coverprofile=coverage.out ./...
|
|
|
|
- name: Upload coverage report
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: coverage-report
|
|
path: coverage.out |