d12b497a28
Create shared storage module for AWS S3 operations with comprehensive development infrastructure: Core Features: - S3 interface with two upload patterns (manager and direct) - Presigned URL generation with 15-minute expiration - Support for multipart uploads and direct PutObject - Comprehensive test coverage (8 tests, 70.4% coverage) - Generic implementation without project-specific dependencies Development Tooling: - .editorconfig for consistent editor settings - .pre-commit-config.yaml with Go linters and formatters - .golangci.yml for golangci-lint configuration - commitlint.config.js for conventional commit validation - cliff.toml for automated changelog generation (v0.0.1) - renovate.json for automated dependency updates - .gitlab-ci.yml for CI/CD pipeline CI/CD Pipeline: - Automated testing with race detection - Coverage tracking and Codecov integration - Vulnerability scanning with govulncheck - Pre-commit validation gates - Release automation Module exports: - New(bucket) - Upload manager pattern for large files - NewS3(cfg, bucket) - Direct upload pattern - Store(path, content, contentType) - Upload and get presigned URL 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
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.3@sha256:69d10098be2e990bb1d987daec0e36d18ad287e139450dc7d98a0ded3498888d
|
|
|
|
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.3@sha256:69d10098be2e990bb1d987daec0e36d18ad287e139450dc7d98a0ded3498888d
|
|
script:
|
|
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
- govulncheck ./...
|