Repository navigation
99 lines (76 loc) · 2.91 KB
/
Copy pathci.yml
File metadata and controls
99 lines (76 loc) · 2.91 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
# The workflow only checks out code and runs tests; it never needs write access.
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build production bundle
if: ${{ github.event_name != 'pull_request' }}
run: npm run build
- name: Install Playwright Chromium
run: npx playwright install chromium --with-deps
- name: Run browser tests
run: npm run test:ui
- name: Run accessibility modal tests
if: ${{ github.event_name != 'pull_request' }}
run: npm run test:accessibility
- name: Run deploy guard
run: npm run test:deploy-guard
- name: Run proxy allowlist tests
run: npm run test:proxies
- name: Scan production bundle for API key/endpoint leaks
if: ${{ github.event_name != 'pull_request' }}
run: python3 scripts/scan_bundle_for_leaks.py
# The runner's request validation is the code that rejected
# flutter_web_plugins and failed every deploy for months, and its tests only
# ran on a developer's machine - so nothing stopped that regression returning.
# Also build and smoke the actual image: source-only tests cannot detect
# CLI/signed SDK incompatibility, missing image files, or Dart toolchain drift.
runner:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Dart
uses: dart-lang/setup-dart@6afc89df92d6eb3834022f73cd65adc8cdfcb92d # v1
- name: Install runner dependencies
working-directory: cloud-run/ffai-runner
run: dart pub get
- name: Analyze the runner
working-directory: cloud-run/ffai-runner
run: dart analyze
- name: Test the runner
working-directory: cloud-run/ffai-runner
run: dart test
- name: Build runner image
if: ${{ github.event_name != 'pull_request' }}
run: docker build --tag ccc-ffai-runner:ci cloud-run/ffai-runner
- name: Smoke runner image and current SDK (no credentials)
if: ${{ github.event_name != 'pull_request' }}
run: |
docker run --rm --entrypoint dart \
--volume "$PWD/cloud-run/ffai-runner/tool:/smoke:ro" \
ccc-ffai-runner:ci /smoke/smoke.dart