Repository navigation
94 lines (92 loc) · 2.74 KB
/
Copy pathci.yml
File metadata and controls
94 lines (92 loc) · 2.74 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
name: ci
on:
push:
branches: [v1, main]
pull_request:
jobs:
python:
name: python ${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install the CLI
run: python -m pip install .
- name: Entry point works from another directory
run: factory --version
working-directory: ${{ runner.temp }}
- name: Smoke init and status from the installed CLI in a temporary directory
shell: bash
working-directory: ${{ runner.temp }}
run: |
d="$(mktemp -d)"
cd "$d"
factory init --name smoke
factory status
factory status --config
factory check
- name: Test suite (parallel, 300 s budget)
run: python tests/run_tests.py --budget 300
- name: Upload test output
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-output-${{ matrix.os }}-${{ matrix.python }}
path: .tmp/test-output
runner:
name: browser runner on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
defaults:
run:
working-directory: browser
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: browser/package-lock.json
- name: Install the runner and its headless browser
shell: bash
run: |
npm ci
if [ "$RUNNER_OS" = "Linux" ]; then npx playwright install --with-deps chromium; else npx playwright install chromium; fi
- name: Runner suite (local static pages, 90 s budget)
run: npm test
timeout-minutes: 2
e2e:
name: python suite with the real runner on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install the runner and its headless browser
working-directory: browser
run: |
npm ci
npx playwright install --with-deps chromium
- name: Real-runner tests
run: python tests/run_tests.py browser_e2e