Skip to content

Commit c481493

Browse files
ndbroadbentclaude
andcommitted
Update documentation: examples/ → integration_tests/
Fixed all references to the old examples/ directory which was renamed to integration_tests/ earlier in the project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7abd474 commit c481493

5 files changed

Lines changed: 120 additions & 120 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: ci
22
on:
3-
push:
3+
pull_request:
44
branches:
55
- main
6-
pull_request:
6+
push:
77
branches:
88
- main
99
jobs:
10-
fmt:
10+
clippy:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
@@ -50,8 +50,8 @@ jobs:
5050
mkdir -p "$SKIP_CACHE_DIR"
5151
fi
5252
shell: bash
53-
- name: Format check
54-
run: cargo fmt -- --check
53+
- name: Clippy check
54+
run: cargo clippy --all-targets --all-features -- -D warnings
5555
- id: record_completion
5656
name: Record job completion
5757
run: |-
@@ -63,8 +63,11 @@ jobs:
6363
mkdir -p "$SKIP_CACHE_DIR"
6464
echo "$(date): Job completed successfully" > "$SKIP_MARKER"
6565
shell: bash
66-
clippy:
66+
test:
6767
runs-on: ubuntu-latest
68+
needs:
69+
- clippy
70+
- fmt
6871
steps:
6972
- name: Checkout code
7073
uses: actions/checkout@v4
@@ -79,6 +82,11 @@ jobs:
7982
find . -path './src/**/*.rs' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
8083
find . -path './Cargo.toml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
8184
find . -path './Cargo.lock' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
85+
find . -path './tests/**/*.rs' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
86+
find . -path './tests/**/*.yml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
87+
find . -path './tests/**/*.trycmd' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
88+
find . -path './examples/**/*.yml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
89+
find . -path './examples/**/*.yaml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
8290
8391
if [ -s "$TEMP_HASH_FILE" ]; then
8492
# Calculate hash of file contents
@@ -106,8 +114,8 @@ jobs:
106114
mkdir -p "$SKIP_CACHE_DIR"
107115
fi
108116
shell: bash
109-
- name: Clippy check
110-
run: cargo clippy --all-targets --all-features -- -D warnings
117+
- name: Run tests
118+
run: cargo test --all-features
111119
- id: record_completion
112120
name: Record job completion
113121
run: |-
@@ -119,11 +127,8 @@ jobs:
119127
mkdir -p "$SKIP_CACHE_DIR"
120128
echo "$(date): Job completed successfully" > "$SKIP_MARKER"
121129
shell: bash
122-
test:
130+
fmt:
123131
runs-on: ubuntu-latest
124-
needs:
125-
- clippy
126-
- fmt
127132
steps:
128133
- name: Checkout code
129134
uses: actions/checkout@v4
@@ -138,11 +143,6 @@ jobs:
138143
find . -path './src/**/*.rs' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
139144
find . -path './Cargo.toml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
140145
find . -path './Cargo.lock' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
141-
find . -path './tests/**/*.rs' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
142-
find . -path './tests/**/*.yml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
143-
find . -path './tests/**/*.trycmd' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
144-
find . -path './examples/**/*.yml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
145-
find . -path './examples/**/*.yaml' -type f 2>/dev/null | sort >> "$TEMP_HASH_FILE" || true
146146
147147
if [ -s "$TEMP_HASH_FILE" ]; then
148148
# Calculate hash of file contents
@@ -170,8 +170,8 @@ jobs:
170170
mkdir -p "$SKIP_CACHE_DIR"
171171
fi
172172
shell: bash
173-
- name: Run tests
174-
run: cargo test --all-features
173+
- name: Format check
174+
run: cargo fmt -- --check
175175
- id: record_completion
176176
name: Record job completion
177177
run: |-

.github/workflows/docs.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ permissions:
1111
contents: read
1212
pages: write
1313
jobs:
14-
ci_gate:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
- uses: actions/checkout@v4
20-
- name: Wait for CI checks to complete
21-
uses: actions/github-script@v7
22-
with:
23-
script: |
24-
const wait = require('./.github/wait-for-checks.js');
25-
await wait({ github, context, core, checks: ["test"] });
2614
build:
2715
runs-on: ubuntu-latest
2816
needs:
@@ -89,6 +77,18 @@ jobs:
8977
environment:
9078
name: github-pages
9179
url: ${{ steps.deployment.outputs.page_url }}
80+
ci_gate:
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Checkout code
84+
uses: actions/checkout@v4
85+
- uses: actions/checkout@v4
86+
- name: Wait for CI checks to complete
87+
uses: actions/github-script@v7
88+
with:
89+
script: |
90+
const wait = require('./.github/wait-for-checks.js');
91+
await wait({ github, context, core, checks: ["test"] });
9292
concurrency:
9393
group: pages
9494
cancel-in-progress: false

.github/workflows/release.yml

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,94 @@
11
name: release
22
on:
3-
workflow_dispatch: {}
43
push:
54
tags:
65
- v*
6+
workflow_dispatch: {}
77
permissions:
88
contents: write
99
jobs:
10+
release_create:
11+
runs-on: ubuntu-latest
12+
needs:
13+
- release_build
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-tags: true
21+
fetch-depth: 0
22+
- name: Download artifacts
23+
uses: actions/download-artifact@v4
24+
with:
25+
path: artifacts
26+
- id: version
27+
name: Get version from Cargo.toml
28+
run: |
29+
VERSION=$(grep -E '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
30+
{
31+
echo "version=$VERSION"
32+
} >> "$GITHUB_OUTPUT"
33+
34+
if [ "${{ github.event_name }}" = "push" ]; then
35+
TAG="${GITHUB_REF#refs/tags/}"
36+
EXPECTED_TAG="v$VERSION"
37+
if [ "$TAG" != "$EXPECTED_TAG" ]; then
38+
echo "Error: Tag $TAG doesn't match expected $EXPECTED_TAG from Cargo.toml" >&2
39+
exit 1
40+
fi
41+
{
42+
echo "tag=$TAG"
43+
} >> "$GITHUB_OUTPUT"
44+
else
45+
{
46+
echo "tag=v$VERSION"
47+
} >> "$GITHUB_OUTPUT"
48+
fi
49+
- name: Generate checksums
50+
run: |
51+
set -e
52+
cd artifacts
53+
for dir in */; do
54+
cd "$dir"
55+
for file in *; do
56+
case "$file" in
57+
*.tar.gz|*.zip)
58+
if [ -f "$file" ]; then
59+
sha256sum "$file" > "${file}.sha256" || shasum -a 256 "$file" | awk '{print $1}' > "${file}.sha256"
60+
fi
61+
;;
62+
esac
63+
done
64+
cd ..
65+
done
66+
cd ..
67+
- name: Generate changelog
68+
run: |
69+
cat > changelog.md <<EOF
70+
## Installation
71+
72+
### One-liner (Linux/macOS)
73+
curl -fsSL https://docspring.github.io/cigen/install.sh | sh
74+
75+
### Direct downloads
76+
- macOS (Intel): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-macos-amd64.tar.gz
77+
- macOS (Apple Silicon): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-macos-arm64.tar.gz
78+
- Linux (x86_64): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-linux-amd64.tar.gz
79+
- Linux (ARM64): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-linux-arm64.tar.gz
80+
EOF
81+
- name: Create GitHub Release
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
tag_name: ${{ steps.version.outputs.tag }}
85+
prerelease: ${{ contains(steps.version.outputs.tag, '-') }}
86+
body_path: changelog.md
87+
name: CIGen v${{ steps.version.outputs.version }}
88+
draft: false
89+
files: |
90+
artifacts/**/*.tar.gz
91+
artifacts/**/*.sha256
1092
docker_image:
1193
runs-on: ubuntu-latest
1294
needs:
@@ -74,8 +156,8 @@ jobs:
74156
- name: Checkout repository
75157
uses: actions/checkout@v4
76158
with:
77-
fetch-tags: true
78159
fetch-depth: 0
160+
fetch-tags: true
79161
- name: Wait for required checks
80162
uses: actions/github-script@v7
81163
with:
@@ -106,87 +188,5 @@ jobs:
106188
- name: Upload artifact
107189
uses: actions/upload-artifact@v4
108190
with:
109-
name: ${{ matrix.name }}
110191
path: ${{ env.ASSET_PATH }}
111-
release_create:
112-
runs-on: ubuntu-latest
113-
needs:
114-
- release_build
115-
steps:
116-
- name: Checkout code
117-
uses: actions/checkout@v4
118-
- name: Checkout repository
119-
uses: actions/checkout@v4
120-
with:
121-
fetch-tags: true
122-
fetch-depth: 0
123-
- name: Download artifacts
124-
uses: actions/download-artifact@v4
125-
with:
126-
path: artifacts
127-
- id: version
128-
name: Get version from Cargo.toml
129-
run: |
130-
VERSION=$(grep -E '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
131-
{
132-
echo "version=$VERSION"
133-
} >> "$GITHUB_OUTPUT"
134-
135-
if [ "${{ github.event_name }}" = "push" ]; then
136-
TAG="${GITHUB_REF#refs/tags/}"
137-
EXPECTED_TAG="v$VERSION"
138-
if [ "$TAG" != "$EXPECTED_TAG" ]; then
139-
echo "Error: Tag $TAG doesn't match expected $EXPECTED_TAG from Cargo.toml" >&2
140-
exit 1
141-
fi
142-
{
143-
echo "tag=$TAG"
144-
} >> "$GITHUB_OUTPUT"
145-
else
146-
{
147-
echo "tag=v$VERSION"
148-
} >> "$GITHUB_OUTPUT"
149-
fi
150-
- name: Generate checksums
151-
run: |
152-
set -e
153-
cd artifacts
154-
for dir in */; do
155-
cd "$dir"
156-
for file in *; do
157-
case "$file" in
158-
*.tar.gz|*.zip)
159-
if [ -f "$file" ]; then
160-
sha256sum "$file" > "${file}.sha256" || shasum -a 256 "$file" | awk '{print $1}' > "${file}.sha256"
161-
fi
162-
;;
163-
esac
164-
done
165-
cd ..
166-
done
167-
cd ..
168-
- name: Generate changelog
169-
run: |
170-
cat > changelog.md <<EOF
171-
## Installation
172-
173-
### One-liner (Linux/macOS)
174-
curl -fsSL https://docspring.github.io/cigen/install.sh | sh
175-
176-
### Direct downloads
177-
- macOS (Intel): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-macos-amd64.tar.gz
178-
- macOS (Apple Silicon): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-macos-arm64.tar.gz
179-
- Linux (x86_64): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-linux-amd64.tar.gz
180-
- Linux (ARM64): https://github.com/${{ github.repository }}/releases/download/${{ steps.version.outputs.tag }}/cigen-linux-arm64.tar.gz
181-
EOF
182-
- name: Create GitHub Release
183-
uses: softprops/action-gh-release@v2
184-
with:
185-
tag_name: ${{ steps.version.outputs.tag }}
186-
name: CIGen v${{ steps.version.outputs.version }}
187-
prerelease: ${{ contains(steps.version.outputs.tag, '-') }}
188-
draft: false
189-
body_path: changelog.md
190-
files: |
191-
artifacts/**/*.tar.gz
192-
artifacts/**/*.sha256
192+
name: ${{ matrix.name }}

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ cargo fmt
8181
cargo clippy --all-targets --all-features -- -D warnings
8282

8383
# Test validation on the example
84-
cargo run -- --config examples/circleci_rails/ validate
84+
cargo run -- --config integration_tests/circleci_rails/ validate
8585

8686
# Test generation on the example
87-
cargo run -- --config examples/circleci_rails/ generate
87+
cargo run -- --config integration_tests/circleci_rails/ generate
8888
```
8989

9090
## Rust Code Style
@@ -236,7 +236,7 @@ You can also reference `/Users/ndbroadbent/code/docspring/lib/tools/generate_cir
236236

237237
**CRITICAL SECURITY DISTINCTION**:
238238

239-
### Public Examples (`examples/`)
239+
### Public Examples (`integration_tests/`)
240240

241241
- **PUBLIC MIT LICENSED** code visible to all users
242242
- Serves as demonstration of complex, production-ready CI pipeline patterns

docs/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import {
7171
### File Structure
7272

7373
- Use kebab-case for file names: `mcp-server-config.mdx`
74-
- Organize in logical directories: `mcp/`, `commands/`, `examples/`
74+
- Organize in logical directories: `mcp/`, `commands/`, `integration_tests/`
7575
- Use `overview.mdx` for main landing pages in sections
7676

7777
### Frontmatter Requirements

0 commit comments

Comments
 (0)