Merge pull request 'chore: migrate from GitLab to Gitea' (#44) from migrate-to-gitea into main
Reviewed-on: #44
This commit was merged in pull request #44.
This commit is contained in:
@@ -1,38 +0,0 @@
|
|||||||
include:
|
|
||||||
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
|
|
||||||
- project: unboundsoftware/ci-templates
|
|
||||||
file: Defaults.gitlab-ci.yml
|
|
||||||
- project: unboundsoftware/ci-templates
|
|
||||||
file: Release.gitlab-ci.yml
|
|
||||||
- project: unboundsoftware/ci-templates
|
|
||||||
file: Pre-Commit-Go.gitlab-ci.yml
|
|
||||||
|
|
||||||
image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- deps
|
|
||||||
- test
|
|
||||||
|
|
||||||
deps:
|
|
||||||
stage: deps
|
|
||||||
script:
|
|
||||||
- go mod download
|
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
dependencies:
|
|
||||||
- deps
|
|
||||||
script:
|
|
||||||
- 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: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
|
|
||||||
script:
|
|
||||||
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
||||||
- govulncheck ./...
|
|
||||||
@@ -10,13 +10,6 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- --allow-multiple-documents
|
- --allow-multiple-documents
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
|
|
||||||
rev: v1.0.6
|
|
||||||
hooks:
|
|
||||||
- id: gitlab-ci-linter
|
|
||||||
args:
|
|
||||||
- --project
|
|
||||||
- unboundsoftware/storage
|
|
||||||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
||||||
rev: v9.23.0
|
rev: v9.23.0
|
||||||
hooks:
|
hooks:
|
||||||
@@ -30,7 +23,7 @@ repos:
|
|||||||
- id: go-imports
|
- id: go-imports
|
||||||
args:
|
args:
|
||||||
- -local
|
- -local
|
||||||
- gitlab.com/unboundsoftware/storage
|
- git.unbound.se/unboundsoftware/storage
|
||||||
- repo: https://github.com/lietu/go-pre-commit
|
- repo: https://github.com/lietu/go-pre-commit
|
||||||
rev: v1.0.0
|
rev: v1.0.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Provides standardized S3 object storage utilities with presigned URL generation.
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import "gitlab.com/unboundsoftware/storage"
|
import "git.unbound.se/unboundsoftware/storage"
|
||||||
|
|
||||||
// Option 1: Managed uploads (multipart, 5MB part size) - loads AWS config automatically
|
// Option 1: Managed uploads (multipart, 5MB part size) - loads AWS config automatically
|
||||||
s3Storage, err := storage.New("my-bucket")
|
s3Storage, err := storage.New("my-bucket")
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Shared storage utilities for AWS S3.
|
|||||||
### Using the Upload Manager (recommended for large files)
|
### Using the Upload Manager (recommended for large files)
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import "gitlab.com/unboundsoftware/storage"
|
import "git.unbound.se/unboundsoftware/storage"
|
||||||
|
|
||||||
// Create storage with automatic AWS config loading
|
// Create storage with automatic AWS config loading
|
||||||
s3Storage, err := storage.New("my-bucket")
|
s3Storage, err := storage.New("my-bucket")
|
||||||
@@ -31,7 +31,7 @@ url, err := s3Storage.Store("path/to/file.pdf", fileReader, "application/pdf")
|
|||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
"github.com/aws/aws-sdk-go-v2/config"
|
"github.com/aws/aws-sdk-go-v2/config"
|
||||||
"gitlab.com/unboundsoftware/storage"
|
"git.unbound.se/unboundsoftware/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Load custom AWS config
|
// Load custom AWS config
|
||||||
|
|||||||
Reference in New Issue
Block a user