Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

fix: enhance authentication checks #163

fix: enhance authentication checks

fix: enhance authentication checks #163

Workflow file for this run

name: CI
on:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]
permissions:
contents: read
pull-requests: read
jobs:
lint:
name: Lint Go
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.1
install-mode: goinstall
args: --timeout=5m
test:
name: Test Go
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18-alpine
env:
POSTGRES_USER: podling
POSTGRES_PASSWORD: podling_test
POSTGRES_DB: podling
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
go-version: [ '1.25' ]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Download dependencies
run: go mod download
- name: Verify dependencies
run: go mod verify
- name: Run tests
env:
TEST_DATABASE_URL: postgres://podling:podling_test@localhost:5432/podling?sslmode=disable
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Check test coverage
run: |
go tool cover -func=coverage.out | tail -1
# Calculate coverage for internal/ packages only (exclude cmd/)
INTERNAL_COVERAGE=$(go tool cover -func=coverage.out | grep "internal/" | awk '{sum += $3; count++} END {print sum/count}')
echo "Internal packages coverage: ${INTERNAL_COVERAGE}%"
if (( $(echo "INTERNAL_COVERAGE < 60" | bc -l) )); then
echo "❌ Coverage $INTERNAL_COVERAGE% is below minimum 60%"
exit 1
fi
echo "✅ Coverage $INTERNAL_COVERAGE% meets minimum requirement"
build-web:
name: Build Web
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Type check
run: npx tsc --noEmit
- name: Build
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: web-dist
path: web/dist
retention-days: 7