Repository navigation
66 lines (55 loc) · 2.01 KB
/
Copy pathqc-ci.yml
File metadata and controls
66 lines (55 loc) · 2.01 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
name: qc-ci
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
qc-ci:
name: deterministic qc
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Setup uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: "0.11.21"
prune-cache: true
- name: Sync dependencies
run: uv sync --frozen --all-groups --python python3
- name: Run QC inventory
run: uv run --frozen python tools/qc_patrol/cli.py inventory --repo . --out qc-out/inventory.json
- name: Run deterministic QC
run: uv run --frozen python tools/qc_patrol/cli.py deterministic --repo . --profile ci --out qc-out/ledger.json
- name: Run QC tests
run: |
set -euo pipefail
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
sudo systemctl start "user@$(id -u).service"
systemctl --user show-environment >/dev/null
workers="$(uv run --frozen python ls/tools/localsetup.py --source-root . test-workers)"
uv run --frozen pytest -n "$workers" -q ls/tests/test_qc_patrol.py --maxfail=1
- name: Summarize QC
run: |
set -euo pipefail
{
echo "## QC CI"
echo
echo '```json'
cat qc-out/ledger.json
echo '```'
} >>"$GITHUB_STEP_SUMMARY"
- name: Upload QC artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: qc-ci-${{ github.sha }}
path: qc-out/