Skip to content

Commit 126ec11

Browse files
authored
Merge pull request #3 from atelpis/repo/ci-tests
Add tests and codecov integration
2 parents acddcf2 + 0989c1a commit 126ec11

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
tags-ignore: ["**"]
7+
pull_request:
8+
9+
jobs:
10+
test-and-coverage:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: "1.18"
19+
cache: false
20+
21+
- name: Build
22+
run: go build -v ./...
23+
24+
- name: Test and Coverage
25+
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
26+
27+
- name: Upload coverage reports to Codecov
28+
uses: codecov/codecov-action@v5
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }}
31+
slug: atelpis/enflag

0 commit comments

Comments
 (0)