Skip to content

improved mxcache tests #27

improved mxcache tests

improved mxcache tests #27

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23.3'
- name: Test
run: |
go generate ./...
go test -tags test -v -coverprofile=/tmp/coverage.out ./...
- name: Code coverage
run: |
go tool cover -html=/tmp/coverage.out -o /tmp/coverage.html
go tool cover -func=/tmp/coverage.out -o /tmp/coverage.txt
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: /tmp/coverage.*