Skip to content

Commit

Permalink
added go-test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstonematt committed Oct 1, 2024
1 parent 2c80873 commit 7178328
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
@@ -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 solana_exporter
run: go test -v ./cmd/solana_exporter/...

- name: Test rpc package
run: go test -v ./pkg/rpc/...

- 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
File renamed without changes.

0 comments on commit 7178328

Please sign in to comment.