Skip to content

Commit 1b6db97

Browse files
committed
chore: Add test.yml GitHub Actions workflow for running tests
- Adds a CI workflow to run tests on pull requests and direct pushes to the develop branch. - Generates test coverage reports.
1 parent b2a16dd commit 1b6db97

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test and Coverage
2+
3+
on:
4+
push:
5+
branches: [ develop, staging, main ]
6+
pull_request:
7+
branches: [ develop, staging, main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: '1.23'
21+
22+
- name: Install dependencies
23+
run: go get .
24+
25+
- name: Build and Test
26+
run: |
27+
go build -v ./...
28+
go test -v -coverprofile=coverage.txt ./...
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}
34+
slug: KengoWada/taskqueue

0 commit comments

Comments
 (0)