38 lines
765 B
YAML
38 lines
765 B
YAML
name: build_and_test
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
build_and_test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Update System
|
|
run: |
|
|
sudo apt update && sudo apt upgrade -y
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Install Modules
|
|
run: go mod tidy
|
|
|
|
- name: Test
|
|
run: go test -coverprofile=coverage.txt -v ./...
|
|
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
#token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./coverage.txt
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: true
|