mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 00:31:35 +00:00
- Updated all actions to latest versions with SHA pinning - Added security enhancements: CodeQL scans, artifact attestations, OIDC - Enabled caching, multi-platform Docker builds - Added Dependabot configuration for automated updates - Improved matrix testing across Go versions 1.22-1.25
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
security-events: write # For code scanning
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v5.2.0
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35 # v5.4.0
|
|
with:
|
|
go-version: "1.25"
|
|
cache: true
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Lint
|
|
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v6.1.1
|
|
with:
|
|
version: latest
|
|
args: --timeout=5m
|
|
|
|
- name: Test
|
|
run: go test -v -race -coverprofile=coverage.out ./...
|
|
|
|
- name: Upload coverage
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: coverage
|
|
path: coverage.out
|