Repository navigation
65 lines (53 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
65 lines (53 loc) · 1.58 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
name: CI
# pull_request: validates every PR branch. push: only default branches — avoids duplicate
# runs when both fire for the same change (push to feat/* also opens/syncs a PR).
on:
pull_request:
push:
branches:
- master
- main
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-lint-build:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
DATABASE_URL: postgresql://user:password@example.com/clawproxy
ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable Corepack (Yarn from packageManager)
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Run tests with coverage
run: yarn test:coverage
- name: Run linter
run: yarn lint
- name: Run production build
run: yarn build
docker-build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
build-args: |
DATABASE_URL=postgresql://user:password@example.com/clawproxy
cache-from: type=gha
cache-to: type=gha,mode=max