Skip to content

Commit f7b4b45

Browse files
authored
ci: unit gate, nightly strict e2e, tag-triggered image publish (#47)
* ci: unit gate, nightly strict e2e, tag-triggered image publish * fix: restore pypi blocker comment and exact echo text
1 parent 709797a commit f7b4b45

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: release
2+
on:
3+
push:
4+
tags: ["v*"]
5+
6+
permissions:
7+
contents: read
8+
packages: write
9+
10+
jobs:
11+
image:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: docker/setup-buildx-action@v3
16+
- uses: docker/login-action@v3
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
- uses: docker/build-push-action@v6
22+
with:
23+
context: .
24+
push: true
25+
tags: |
26+
ghcr.io/codellm-devkit/cocoa:${{ github.ref_name }}
27+
ghcr.io/codellm-devkit/cocoa:latest
28+
29+
# PyPI publish is BLOCKED on the package-name conflict (cocoa-mcp#3).
30+
# Flip `if: false` and add a trusted-publisher config once the name is free.
31+
pypi:
32+
if: false
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: astral-sh/setup-uv@v5
37+
- run: uv build
38+
- run: 'echo "enable trusted publishing, then: uv publish"'

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
schedule:
7+
- cron: "17 6 * * *" # nightly strict e2e
8+
9+
jobs:
10+
unit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: astral-sh/setup-uv@v5
15+
- run: uv sync --all-groups
16+
- run: uv run pytest -v
17+
18+
e2e:
19+
if: github.event_name == 'schedule'
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 45
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: astral-sh/setup-uv@v5
25+
- uses: actions/setup-go@v5
26+
with:
27+
go-version: "1.25"
28+
- name: Build codeanalyzer-go (unreleased; codeanalyzer-go#5)
29+
run: |
30+
git clone --depth 1 --branch feat/initial-implementation \
31+
https://github.com/codellm-devkit/codeanalyzer-go /tmp/cango
32+
(cd /tmp/cango && go build -o /usr/local/bin/codeanalyzer-go ./cmd/codeanalyzer)
33+
- run: uv sync --all-groups
34+
- name: Jar workaround (python-sdk#236)
35+
run: |
36+
JAR_DIR="$(uv run python -c 'import cldk.analysis.java.codeanalyzer as m, pathlib; print(pathlib.Path(m.__file__).parent / "jar")')"
37+
mkdir -p "${JAR_DIR}"
38+
curl -fsSL -o "${JAR_DIR}/codeanalyzer-2.4.1.jar" \
39+
"https://github.com/codellm-devkit/codeanalyzer-java/releases/download/v2.4.1/codeanalyzer-2.4.1.jar"
40+
- name: Strict e2e (launch gate)
41+
run: uv run pytest -m e2e -v

0 commit comments

Comments
 (0)