Skip to content

Merge branch 'develop' into dependabot/go_modules/dot-examples/server… #268

Merge branch 'develop' into dependabot/go_modules/dot-examples/server…

Merge branch 'develop' into dependabot/go_modules/dot-examples/server… #268

Workflow file for this run

name: CI
permissions:
contents: read
on: [push, pull_request]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.22.5
- name: Install dependencies
run: go mod tidy
- name: Run tests and generate coverage
run: go test -coverprofile=coverage.out ./...
## This step will only be executed if the actions variable CODECOV_BRANCHES
## is set as an array of branches to upload to Codecov.
## Example --var CODECOV_BRANCHES='["main", "feature-1"]'
- name: Upload coverage to Codecov
if: ${{ vars.CODECOV_BRANCHES && contains(fromJson(vars.CODECOV_BRANCHES), github.ref_name) }}
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: unittests
name: codecov-umbrella
verbose: true