added go-test workflow
This commit is contained in:
parent
2c8087380c
commit
fe98f89df1
|
@ -0,0 +1,35 @@
|
|||
name: Go Tests
|
||||
|
||||
on:
|
||||
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
|
Loading…
Reference in New Issue