File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 - uses : actions/checkout@v4
2626 with :
2727 fetch-depth : 0
28+ - name : Install Codex binary fetch dependencies
29+ run : python3 -m pip install zstandard
30+ - name : Fetch bundled codex binary
31+ env :
32+ CODEX_BINARY_RELEASE_TAG : ${{ vars.CODEX_BINARY_RELEASE_TAG || 'rust-v0.122.0' }}
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ run : |
35+ set -euo pipefail
36+ python3 scripts/fetch_codex_binary.py \
37+ --release-tag "$CODEX_BINARY_RELEASE_TAG" \
38+ --target-triple x86_64-unknown-linux-musl
39+ test -x codex/vendor/x86_64-unknown-linux-musl/codex/codex
2840 - name : Codex autonomous review
2941 uses : gersmann/codex-review-action@v1
3042 with :
4456 - uses : actions/checkout@v4
4557 with :
4658 fetch-depth : 0
59+ - name : Install Codex binary fetch dependencies
60+ run : python3 -m pip install zstandard
61+ - name : Fetch bundled codex binary
62+ env :
63+ CODEX_BINARY_RELEASE_TAG : ${{ vars.CODEX_BINARY_RELEASE_TAG || 'rust-v0.122.0' }}
64+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65+ run : |
66+ set -euo pipefail
67+ python3 scripts/fetch_codex_binary.py \
68+ --release-tag "$CODEX_BINARY_RELEASE_TAG" \
69+ --target-triple x86_64-unknown-linux-musl
70+ test -x codex/vendor/x86_64-unknown-linux-musl/codex/codex
4771 - name : Codex autonomous edits
4872 uses : gersmann/codex-review-action@v1
4973 with :
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ def test_binary_fetch_workflows_default_to_pinned_codex_release() -> None:
99 for workflow_path in (
1010 Path (".github/workflows/ci.yml" ),
1111 Path (".github/workflows/release-published.yml" ),
12+ Path (".github/workflows/codex-autoreview.yml" ),
1213 ):
1314 workflow = workflow_path .read_text ()
1415
@@ -38,3 +39,14 @@ def test_release_workflow_rejects_pypi_oversized_files_before_publish() -> None:
3839 assert workflow .index ("Verify PyPI file size limit" ) < workflow .index (
3940 "pypa/gh-action-pypi-publish"
4041 )
42+
43+
44+ def test_autoreview_workflow_fetches_codex_binary_before_action () -> None :
45+ workflow = Path (".github/workflows/codex-autoreview.yml" ).read_text ()
46+
47+ assert workflow .count ("Fetch bundled codex binary" ) == 2
48+ assert workflow .count ("--target-triple x86_64-unknown-linux-musl" ) == 2
49+ assert workflow .count ("test -x codex/vendor/x86_64-unknown-linux-musl/codex/codex" ) == 2
50+ assert workflow .index ("Fetch bundled codex binary" ) < workflow .index (
51+ "gersmann/codex-review-action@v1"
52+ )
You can’t perform that action at this time.
0 commit comments