Repository navigation
92 lines (87 loc) · 3.21 KB
/
Copy pathci.yml
File metadata and controls
92 lines (87 loc) · 3.21 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
# SPDX-FileCopyrightText: 2026 The Gatepost authors
# SPDX-License-Identifier: Apache-2.0
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The js submodule holds its own spec submodule.
submodules: recursive
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
# The oldest Python that the scripts in the spec repo support.
python-version: '3.11'
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
# pnpm check starts reuse and zizmor with uvx. No lock file keys a cache.
enable-cache: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
# The newest PHP. The PHP package supports 8.1 and later, and its own CI tests 8.1.
php-version: '8.4'
tools: composer
coverage: none
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm sdk
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm check
- if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
# The built site, so a reviewer can open the pages of a pull request.
name: site
path: dist
retention-days: 7
commits:
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
BASE: ${{ github.event.pull_request.base.sha }}
HEAD: ${{ github.event.pull_request.head.sha }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The checks read each commit from the base to the head.
fetch-depth: 0
submodules: true
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm exec commitlint --from "$BASE" --to "$HEAD"
- name: Check each commit message for agent tells
run: |
for sha in $(git rev-list "$BASE..$HEAD"); do
git log -1 --format=%B "$sha" > "$RUNNER_TEMP/message"
python3 spec/scripts/check-tells --commit-msg "$RUNNER_TEMP/message"
done
secrets:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# gitleaks must read the whole history.
fetch-depth: 0
persist-credentials: false
- run: |
image=ghcr.io/gitleaks/gitleaks # v8.30.1
digest=sha256:c00b6bd0aeb3071cbcb79009cb16a60dd9e0a7c60e2be9ab65d25e6bc8abbb7f
docker run --rm -v "$PWD:/repo" "$image@$digest" git /repo