-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (71 loc) · 2.07 KB
/
Copy pathci.yml
File metadata and controls
76 lines (71 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
permissions:
contents: read
packages: write
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: test_db
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_pass
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm ls --depth=0
- run: pnpm run lint
- run: pnpm run typecheck
- run: pnpm audit --audit-level moderate
- run: pnpm run test:coverage
env:
DATABASE_URL: postgresql://test_user:test_pass@localhost:5432/test_db
MASTER_KEY: WVdWaFkyVmtaR1ZqTTJGbVlXUmxZek01WVdReQ==
AGENT_JWT_SECRET: ci-agent-jwt-secret-32-bytes-long!!
ADMIN_API_KEY: ci-admin-api-key-secret-32b!!
- name: Upload coverage
uses: codecov/codecov-action@v7
with:
files: ./packages/server/coverage/lcov.info
fail_ci_if_error: false
- name: Upload coverage artifact
uses: actions/upload-artifact@v7
with:
name: coverage-report
path: packages/server/coverage/
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v7
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/reaatech/agent-auth-proxy:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max