Skip to content

Add healthcheck & conf endpoint #7

Add healthcheck & conf endpoint

Add healthcheck & conf endpoint #7

Workflow file for this run

name: Tests
on:
pull_request:
workflow_dispatch:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
- name: fmt
run: |
check=$(go fmt)
if [["${check}" -ne ""]]; then
exit 1
fi
unittests:
name: go_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: run tests
run: |
go test ./... -covermode=count -coverprofile ./coverage.out
- name: coverage
run: |
total_cov=$(go tool cover -func ./coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+')
if [[ "$total_cov" < 80.0 ]]; then
echo "not enought tests"
echo "::warning title=not enought tests::${total_cov}%"
#exit 1
fi
configlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: test
config_data: "{extends: default, rules: {line-length: disable}}"
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0