-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
65 lines (53 loc) · 1.82 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
shell-checks:
name: Shell syntax checks
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install CI tools
run: |
# GitHub-hosted runners may include unrelated Microsoft apt sources; this
# project only needs Ubuntu packages for shellcheck and podman.
for source_file in /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
[ -e "$source_file" ] || continue
if sudo grep -q 'packages.microsoft.com' "$source_file"; then
sudo mv "$source_file" "${source_file}.disabled"
fi
done
sudo apt-get update
sudo apt-get install -y shellcheck podman
- name: Check runtime shell syntax
run: |
bash -n scripts/*
- name: Run ShellCheck
run: |
shellcheck -x scripts/*
shellcheck -x tests/*
- name: Run runtime tests
run: |
bash tests/runtime-home-selection.sh
- name: Build runtime image
run: |
podman build -t codexcli-runtime-ci-smoke .
- name: Check runtime user
run: |
podman run --rm codexcli-runtime-ci-smoke getent passwd codex
podman run --rm codexcli-runtime-ci-smoke id codex
podman run --rm codexcli-runtime-ci-smoke sh -lc 'test -d /home/codex/.codex && test -w /home/codex/.codex'
- name: Check expected files
run: |
test -f Containerfile
test -f README.md
test -f docs/runtime-notes.md
test -f templates/codex-home/AGENTS.md
test -x scripts/codexcli
test -x scripts/codexcli-login
test -x scripts/codexcli-strict