-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (58 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
69 lines (58 loc) · 1.57 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint and format check
run: yarn run check
- name: Build
run: yarn build
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: false
load: true
tags: threatzone-mcp:ci
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
- name: Smoke-test container
run: |
docker run -d --rm --name tz-mcp-ci -p 7860:7860 threatzone-mcp:ci
for i in $(seq 1 30); do
if curl -fsS http://127.0.0.1:7860/healthz >/dev/null; then
echo "healthz responded ok after ${i}s"
docker stop tz-mcp-ci
exit 0
fi
sleep 1
done
echo "healthz never came up"
docker logs tz-mcp-ci || true
docker stop tz-mcp-ci || true
exit 1