Skip to content

Commit 91c1099

Browse files
hrntknrCopilot
andauthored
ci: add GitHub Actions test workflow (#38)
* ci: add GitHub Actions test workflow Add automated testing workflow that runs on push and pull requests to main branch. Includes Go module caching and code coverage reporting via Codecov. * ci: update GitHub Actions to latest versions Update actions/cache from v3 to v4 and codecov/codecov-action from v3 to v4. Consolidate test steps to run tests with coverage in single step. * Update .github/workflows/test.yaml Co-authored-by: Copilot <[email protected]> * ci: remove Go modules cache from test workflow Remove caching step to simplify the workflow and avoid potential cache-related issues. --------- Co-authored-by: Copilot <[email protected]>
1 parent 92eb5d4 commit 91c1099

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/test.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v4
21+
with:
22+
go-version: "1.23"
23+
24+
- name: Download dependencies
25+
run: go mod download
26+
27+
- name: Run tests
28+
run: go test -v -coverprofile=coverage.out ./...
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v4
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)