aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/test.yml
blob: 9f18afa84ce6c111bd5473a23b1a512f4904fade (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Test

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  run-tests:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.23'
      - name: Runs tests with coverage
        run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v4
        with:
          files: coverage.out
          token: ${{ secrets.CODECOV_TOKEN }}
          fail_ci_if_error: true