Skip to content

feat: implement PostgreSQL table column retrieval and batch insert fu… #14

feat: implement PostgreSQL table column retrieval and batch insert fu…

feat: implement PostgreSQL table column retrieval and batch insert fu… #14

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
cache: true
- name: Install dependencies
run: go mod download
- name: Run tests with coverage
run: |
go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage.out
- name: Convert coverage to HTML
run: go tool cover -html=coverage.out -o coverage.html
- name: Upload HTML coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report-html
path: coverage.html
security:
name: Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
cache: true
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
- name: Upload Gosec Report
if: always()
uses: actions/upload-artifact@v3
with:
name: gosec-report
path: gosec.sarif
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH,MEDIUM'
scanners: 'vuln,secret,config'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'
category: 'trivy'
- name: Upload Trivy scan results as artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: trivy-results
path: trivy-results.sarif