40 Commits

Author SHA1 Message Date
argoyle ff779d9456 build(deps): bump github.com/sparetimecoders/goamqp from 0.1.3 to 0.1.4
Bumps [github.com/sparetimecoders/goamqp](https://github.com/sparetimecoders/goamqp) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/sparetimecoders/goamqp/releases)
- [Commits](https://github.com/sparetimecoders/goamqp/compare/v0.1.3...v0.1.4)
2023-05-11 05:19:41 +00:00
argoyle eba7784e59 ci: update Go version and fix gitlabci lint 2023-05-04 08:34:40 +02:00
argoyle d022eb8ebd ci: update to Go 1.20.3 2023-04-06 10:26:35 +02:00
argoyle 9c802b1239 ci: update Go verion for vulnerabilities scan 2023-03-09 22:00:21 +01:00
argoyle 2e3bd451df build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)
2023-02-26 10:22:34 +00:00
argoyle 0608960a02 ci: update to golang 1.20.1 2023-02-26 11:03:49 +01:00
argoyle bbbfb99dd9 ci: change dependabot rebase strategy 2023-01-29 10:52:30 +01:00
argoyle eef42d4b32 ci: update to Go 1.19.5 2023-01-29 10:52:23 +01:00
argoyle d1a9414390 ci: add release handling 2023-01-29 10:52:12 +01:00
argoyle dee3bb5d60 ci: add local module to pre-commit config 2023-01-13 13:39:34 +01:00
argoyle dcbdef35cf ci: add pre-commit and remove those checks from test step 2022-12-28 20:06:28 +01:00
argoyle 1794fcd2ad build(deps): bump github.com/sparetimecoders/goamqp from 0.1.2 to 0.1.3
Bumps [github.com/sparetimecoders/goamqp](https://github.com/sparetimecoders/goamqp) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/sparetimecoders/goamqp/releases)
- [Commits](https://github.com/sparetimecoders/goamqp/compare/v0.1.2...v0.1.3)
2022-11-15 05:19:17 +00:00
argoyle abfeb751b2 chore: replace deprecated ioutil.ReadAll 2022-11-10 10:54:45 +01:00
argoyle 51f0aaf0ca build(deps): bump github.com/sparetimecoders/goamqp from 0.1.1 to 0.1.2
Bumps [github.com/sparetimecoders/goamqp](https://github.com/sparetimecoders/goamqp) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/sparetimecoders/goamqp/releases)
- [Commits](https://github.com/sparetimecoders/goamqp/compare/v0.1.1...v0.1.2)
2022-10-26 05:19:33 +00:00
argoyle 8604a3568a build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)
2022-10-24 05:19:21 +00:00
argoyle fee49889cf fix: run builds with Go 1.19.2 to fix vulnerabilities 2022-10-11 17:59:59 +02:00
argoyle 7e70411553 ci: add vulnerability-check 2022-09-13 14:18:20 +02:00
argoyle 610edd6576 chore: switch to moved goamqp 2022-07-20 17:25:13 +02:00
argoyle 2f232e6850 build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)
2022-06-30 05:19:15 +00:00
argoyle be4409a745 build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.4...v1.7.5)
2022-06-24 05:19:11 +00:00
argoyle 83b513ebf8 build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4)
2022-06-21 05:19:14 +00:00
argoyle 51e8d43795 build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)
2022-06-07 05:19:13 +00:00
argoyle e816866e75 build(deps): bump gitlab.com/sparetimecoders/goamqp from 0.4.0 to 0.5.0
Bumps [gitlab.com/sparetimecoders/goamqp](https://gitlab.com/sparetimecoders/goamqp) from 0.4.0 to 0.5.0.
- [Release notes](https://gitlab.com/sparetimecoders/goamqp/tags)
- [Commits](https://gitlab.com/sparetimecoders/goamqp/compare/v0.4.0...v0.5.0)
2022-05-26 05:19:12 +00:00
argoyle ad1bf3cbfa Merge branch 'dependabot-go_modules-github.com-stretchr-testify-1.7.1' into 'main'
build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1

See merge request unboundsoftware/shiny/authz_client!11
2022-03-16 07:29:17 +00:00
argoyle f4e3891f62 build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)
2022-03-16 05:19:33 +00:00
argoyle cf73d6c399 build: add params to codecov 2022-02-20 00:56:58 +01:00
argoyle 74e81114de Merge branch 'dependabot-go_modules-gitlab.com-sparetimecoders-goamqp-0.4.0' into 'main'
chore(deps): bump gitlab.com/sparetimecoders/goamqp from 0.3.2 to 0.4.0

See merge request unboundsoftware/shiny/authz_client!10
2022-02-12 10:27:36 +00:00
argoyle 2299434912 chore(deps): bump gitlab.com/sparetimecoders/goamqp from 0.3.2 to 0.4.0
Bumps [gitlab.com/sparetimecoders/goamqp](https://gitlab.com/sparetimecoders/goamqp) from 0.3.2 to 0.4.0.
- [Release notes](https://gitlab.com/sparetimecoders/goamqp/tags)
- [Commits](https://gitlab.com/sparetimecoders/goamqp/compare/v0.3.2...v0.4.0)
2022-02-12 05:19:39 +00:00
argoyle 3c6ab4bfde Merge branch 'codecov' into 'main'
ci: change to codecov binary instead of bash uploader

See merge request unboundsoftware/shiny/authz_client!9
2021-11-17 05:16:41 +00:00
argoyle a305db2206 ci: change to codecov binary instead of bash uploader 2021-11-17 06:14:49 +01:00
argoyle 6e8b78c6e2 Merge branch 'dependabot' into 'main'
ci: remove dependabot-standalone

See merge request unboundsoftware/shiny/authz_client!8
2021-11-03 17:45:18 +00:00
argoyle 4578694015 ci: remove dependabot-standalone 2021-11-03 18:25:05 +01:00
argoyle dbc4412b9b Merge branch 'fix-pipeline' into 'main'
fix: pipeline

See merge request unboundsoftware/shiny/authz_client!7
2021-10-28 12:56:44 +00:00
argoyle f151464330 fix: pipeline 2021-10-28 14:54:47 +02:00
argoyle bcfa15e4a2 Merge branch 'dependabot-go_modules-github.com-stretchr-testify-1.7.0' into 'main'
chore(deps): bump github.com/stretchr/testify from 1.4.0 to 1.7.0

See merge request unboundsoftware/shiny/authz_client!5
2021-10-26 10:35:08 +00:00
argoyle 41c7e4a3ef chore(deps): bump github.com/stretchr/testify from 1.4.0 to 1.7.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.4.0...v1.7.0)
2021-10-26 12:33:10 +02:00
argoyle 5cdd3bd244 Merge branch 'dependabot-go_modules-gitlab.com-sparetimecoders-goamqp-0.3.2' into 'main'
chore(deps): bump gitlab.com/sparetimecoders/goamqp from 0.3.1 to 0.3.2

See merge request unboundsoftware/shiny/authz_client!6
2021-10-26 09:07:55 +00:00
argoyle 398d267ee5 chore(deps): bump gitlab.com/sparetimecoders/goamqp from 0.3.1 to 0.3.2
Bumps [gitlab.com/sparetimecoders/goamqp](https://gitlab.com/sparetimecoders/goamqp) from 0.3.1 to 0.3.2.
- [Release notes](https://gitlab.com/sparetimecoders/goamqp/tags)
- [Commits](https://gitlab.com/sparetimecoders/goamqp/compare/v0.3.1...v0.3.2)
2021-10-26 05:43:34 +00:00
argoyle 26f8e762c7 Merge branch 'dependabot' into 'main'
chore: add dependabot config

See merge request unboundsoftware/shiny/authz_client!4
2021-10-26 05:22:59 +00:00
argoyle e395518de2 chore: add dependabot config 2021-10-26 07:21:08 +02:00
7 changed files with 159 additions and 39 deletions
+61 -18
View File
@@ -1,32 +1,75 @@
include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
image: golang:1.15
variables:
GOFLAGS: -mod=readonly
image: golang:1.20.4
stages:
- deps
- test
- deps
- test
- prepare
- release
run-pre-commit:
stage: .pre
image: unbound/pre-commit
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
- key:
files:
- .pre-commit-config.yaml
paths:
- ${PRE_COMMIT_HOME}
script:
- pre-commit run --all-files
deps:
stage: deps
script:
- go mod download
- go mod download
test:
stage: test
dependencies:
- deps
- deps
script:
- go fmt $(go list ./...)
- go vet $(go list ./...)
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
- go tool cover -html=coverage.txt -o coverage.html
- go tool cover -func=coverage.txt
- bash <(curl -s https://codecov.io/bash)
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
- go tool cover -html=coverage.txt -o coverage.html
- go tool cover -func=coverage.txt
- curl -Os https://uploader.codecov.io/latest/linux/codecov
- chmod +x codecov
- ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH
vulnerabilities:
stage: test
image: golang:1.20.4
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
prepare_release:
image: node:18
stage: prepare
before_script:
- npm install -g conventional-changelog-cli
script:
- echo "DESCRIPTION=$(conventional-changelog -p conventionalcommits)" > variables.env
artifacts:
paths:
- coverage.html
- coverage.txt
reports:
dotenv: variables.env
rules:
- if: $CI_COMMIT_TAG
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
stage: release
needs:
- job: prepare_release
artifacts: true
script:
- echo "Running release_job for $TAG"
release:
tag_name: '$CI_COMMIT_TAG'
description: '$DESCRIPTION'
rules:
- if: $CI_COMMIT_TAG
+13
View File
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 20
rebase-strategy: none
+43
View File
@@ -0,0 +1,43 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args:
- --allow-multiple-documents
- id: check-added-large-files
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: markdownlint
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
rev: v1.0.3
hooks:
- id: gitlab-ci-linter
args:
- --project
- unboundsoftware/shiny/authz_client
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.3.0
hooks:
- id: commitlint
stages: [ commit-msg ]
additional_dependencies: [ '@commitlint/config-conventional' ]
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-mod-tidy
- id: go-imports
args:
- -local
- gitlab.com/unboundsoftware/shiny/authz_client
- repo: https://github.com/lietu/go-pre-commit
rev: v0.0.1
hooks:
- id: go-test
- id: golangci-lint
- id: gofumpt
+3 -3
View File
@@ -3,11 +3,11 @@ package client
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"reflect"
"gitlab.com/sparetimecoders/goamqp"
"github.com/sparetimecoders/goamqp"
)
// CompanyPrivileges contains the privileges for a combination of email address and company id
@@ -58,7 +58,7 @@ func (h *PrivilegeHandler) Fetch() error {
return err
}
buff, err := ioutil.ReadAll(resp.Body)
buff, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"sort"
"testing"
"github.com/sparetimecoders/goamqp"
"github.com/stretchr/testify/assert"
"gitlab.com/sparetimecoders/goamqp"
)
func TestPrivilegeHandler_Process_InvalidType(t *testing.T) {
+12 -3
View File
@@ -1,8 +1,17 @@
module gitlab.com/unboundsoftware/shiny/authz_client
go 1.13
go 1.19
require (
github.com/stretchr/testify v1.4.0
gitlab.com/sparetimecoders/goamqp v0.3.1
github.com/sparetimecoders/goamqp v0.1.4
github.com/stretchr/testify v1.8.2
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rabbitmq/amqp091-go v1.8.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
+26 -14
View File
@@ -1,21 +1,33 @@
github.com/caarlos0/env v3.5.0+incompatible/go.mod h1:tdCsowwCzMLdkqRYDlHpZCp2UooDD3MspDBjZ2AD02Y=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/rabbitmq/amqp091-go v1.8.1 h1:RejT1SBUim5doqcL6s7iN6SBmsQqyTgXb1xMlH0h1hA=
github.com/rabbitmq/amqp091-go v1.8.1/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc=
github.com/sparetimecoders/goamqp v0.1.4 h1:zNvnCJYb5vraMx+OJCCuPIaXP8ub3Et15ff8ylZrPkY=
github.com/sparetimecoders/goamqp v0.1.4/go.mod h1:WUJIWrbwl6rWxbfQTsy/doY7yHQL55L7M89k7ry6ouU=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
gitlab.com/sparetimecoders/goamqp v0.3.1 h1:Pf5nANlKzCP6h5MVrKgfKknf3Vkz3psGh97Mh8Coxqs=
gitlab.com/sparetimecoders/goamqp v0.3.1/go.mod h1:Xci7oyW/j9kJXr0QRgLRGv8e0R91ZSksPhYCei5FK5U=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=