Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: added coverage measure and models dependencies #10

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
FROM hashicorp/http-echo:latest
FROM golang:1.21.0-alpine3.18 AS builder

EXPOSE 8080/tcp
RUN apk --no-cache add git
WORKDIR /build
COPY go.mod /src/go.mod
COPY go.sum /src/go.sum
WORKDIR /src
RUN go mod download
COPY . /src
RUN go build -o /build/ ./...

ENV DATABASE_DSN = ""
FROM alpine:3.18 AS service

ENTRYPOINT ["/http-echo", "--listen", ":8080", "--text", "DATABASE_DSN=${DATABASE_DSN}"]
EXPOSE 8080/tcp
COPY --from=builder /build/ /service-bin/
WORKDIR /db
WORKDIR /
ENV DATABASE_ENGINE "sqlite"
ENV DATABASE_DSN "/db/database.db?cache=shared&mode=rwc"
ENTRYPOINT ["/service-bin/authentication-go", ":8080"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Release](https://github.com/hawks-atlanta/authentication-go/actions/workflows/release.yaml/badge.svg)](https://github.com/hawks-atlanta/authentication-go/actions/workflows/release.yaml)
[![Tagging](https://github.com/hawks-atlanta/authentication-go/actions/workflows/tagging.yaml/badge.svg)](https://github.com/hawks-atlanta/authentication-go/actions/workflows/tagging.yaml)
[![Go Report Card](https://goreportcard.com/badge/github.com/hawks-atlanta/authentication-go)](https://goreportcard.com/report/github.com/hawks-atlanta/authentication-go)
[![codecov](https://codecov.io/gh/hawks-atlanta/authentication-go/graph/badge.svg?token=V8TWAO2DQH)](https://codecov.io/gh/hawks-atlanta/authentication-go)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hawks-atlanta/authentication-go)

Microservice used to authorize user inside the system.
Expand Down Expand Up @@ -46,3 +47,6 @@ go tool cover -html ./cover.txt

## Coverage

| [![circle](https://codecov.io/gh/hawks-atlanta/authentication-go/graphs/sunburst.svg?token=V8TWAO2DQH)](https://app.codecov.io/gh/hawks-atlanta/authentication-go) | [![square](https://codecov.io/gh/hawks-atlanta/authentication-go/graphs/tree.svg?token=V8TWAO2DQH)]((https://app.codecov.io/gh/hawks-atlanta/authentication-go)) |
| ------------------------------------------------------------ | ------------------------------------------------------------ |

78 changes: 78 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
module github.com/hawks-atlanta/authentication-go

go 1.21.0

require (
github.com/caarlos0/env/v9 v9.0.0
github.com/gavv/httpexpect/v2 v2.15.0
github.com/gin-gonic/gin v1.9.1
github.com/glebarez/sqlite v1.9.0
github.com/stretchr/testify v1.8.3
gorm.io/driver/postgres v1.5.2
gorm.io/gorm v1.25.4
)

require (
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/glebarez/go-sqlite v1.21.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/imkira/go-interpol v1.1.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.27.10 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/sanity-io/litter v1.5.5 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.48.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.24.1 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.6.0 // indirect
modernc.org/sqlite v1.25.0 // indirect
moul.io/http2curl/v2 v2.3.0 // indirect
)
Loading