Skip to content

Fixed reloader/restarter routes (#59) #5

Fixed reloader/restarter routes (#59)

Fixed reloader/restarter routes (#59) #5

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: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Installing Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Run tests with code coverage
run: |
go test -coverprofile=coverage.out ./... -short
- name: Upload coverage artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v2
with:
name: coverage
path: ./coverage.out
- name: Download coverage artifact
if: github.event_name == 'push'
uses: actions/download-artifact@v2
with:
name: coverage
path: .
- name: Upload coverage reports to Codecov
if: github.event_name == 'push'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: View code coverage report
if: github.event_name == 'push'
run: go tool cover -func=coverage.out