gatus/.github/workflows/test.yml
dependabot[bot] b9233b1191
chore(deps): bump codecov/codecov-action from 4.6.0 to 5.0.7
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.6.0 to 5.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4.6.0...v5.0.7)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 06:08:32 +00:00

35 lines
1.0 KiB
YAML

name: test
on:
pull_request:
paths-ignore:
- '*.md'
- '.examples/**'
push:
branches:
- master
paths-ignore:
- '*.md'
- '.github/**'
- '.examples/**'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.23.3
- uses: actions/checkout@v4
- name: Build binary to make sure it works
run: go build
- name: Test
# We're using "sudo" because one of the tests leverages ping, which requires super-user privileges.
# As for the 'env "PATH=$PATH" "GOROOT=$GOROOT"', we need it to use the same "go" executable that
# was configured by the "Set up Go" step (otherwise, it'd use sudo's "go" executable)
run: sudo env "PATH=$PATH" "GOROOT=$GOROOT" go test ./... -race -coverprofile=coverage.txt -covermode=atomic
- name: Codecov
uses: codecov/codecov-action@v5.0.7
with:
files: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}