Repository navigation
53 lines (53 loc) · 2.78 KB
/
Copy pathci.yml
File metadata and controls
53 lines (53 loc) · 2.78 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
inputs:
cache_benchmark: { type: boolean, default: false }
permissions:
contents: read
jobs:
cache-benchmark:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.cache_benchmark }}
uses: ./.github/workflows/cache-benchmark.yml
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with: { persist-credentials: false }
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with: { node-version: "24.22.3" }
- name: Verify and run pinned actionlint
shell: bash
run: |
archive="$RUNNER_TEMP/actionlint.tar.gz"
curl --fail --location --max-time 60 --output "$archive" https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz
printf '%s %s\n' '8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8' "$archive" | sha256sum --check --status
tar -xzf "$archive" -C "$RUNNER_TEMP" actionlint
"$RUNNER_TEMP/actionlint" -color
- run: npm ci --ignore-scripts
- name: Verify generated Env is reproducible from a clean source tree
run: npm run test:clean
- run: npm run check
- run: npm run test:workers
- name: Verify pinned Codex catalog without inference
run: npm run catalog:check
- name: Install pinned browser for local web acceptance
run: node node_modules/playwright/cli.js install --with-deps chromium
- name: Browser onboarding against local workerd and D1 (synthetic providers)
run: npm run test:web
- run: docker build --tag codexbot-review:local .
- run: npm run test:sandbox
- name: Verify pinned Trivy and reject vulnerable runtime images
shell: bash
run: |
archive="$RUNNER_TEMP/trivy.tar.gz"
curl --fail --location --max-time 90 --output "$archive" https://github.com/aquasecurity/trivy/releases/download/v0.76.2/trivy_0.76.2_Linux-64bit.tar.gz
printf '%s %s\n' 'bc0fc726e017b8927a62b2d3531d7a84ee01769daf5c99ed866dced54089fdbf' "$archive" | sha256sum --check --status
tar -xzf "$archive" -C "$RUNNER_TEMP" trivy
"$RUNNER_TEMP/trivy" image --image-src docker --scanners vuln --severity HIGH,CRITICAL --exit-code 1 --skip-java-db-update --skip-version-check --no-progress --offline-scan --timeout 2m --db-repository ghcr.io/aquasecurity/trivy-db:2 --format json --output "$RUNNER_TEMP/image-vulnerabilities.json" codexbot-review:local
- run: npm audit --audit-level=moderate
- run: node node_modules/wrangler/bin/wrangler.js deploy --dry-run --outdir .local/worker
env: { WRANGLER_SEND_METRICS: "false" }