added admin is_valid endpoint to validate via rest request #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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.* | |