Skip to content

Commit 6a081f0

Browse files
authored
Add GitHub Actions steps for Rust linting and fish shell install (#77)
1 parent e722f85 commit 6a081f0

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
name: "Copilot Setup Steps"
33

44
on:
5-
workflow_dispatch:
6-
push:
7-
paths:
8-
- .github/workflows/copilot-setup-steps.yml
95
pull_request:
106
paths:
117
- .github/workflows/copilot-setup-steps.yml
@@ -33,15 +29,38 @@ jobs:
3329
- name: Checkout code
3430
uses: actions/checkout@v5
3531

32+
- name: Setup Rust nightly toolchain
33+
uses: actions-rust-lang/setup-rust-toolchain@v1
34+
with:
35+
toolchain: nightly
36+
components: rustfmt, clippy
37+
3638
- name: Cache Rust dependencies
3739
uses: Swatinem/rust-cache@v2
3840
with:
3941
cache-on-failure: true
4042

41-
- name: Setup Rust nightly toolchain
42-
uses: actions-rust-lang/setup-rust-toolchain@v1
43+
# Fish shell is required for integration tests in tests/ directory
44+
- name: Install fish shell (for integration tests)
45+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends fish
46+
47+
- name: Verify formatting compliance
48+
run: cargo fmt --check
49+
50+
- name: Run clippy to catch issues early
51+
run: cargo clippy --all-targets --all-features -- -D warnings
52+
53+
- name: Validate code compiles
54+
run: cargo check --all-targets --all-features
55+
56+
- name: Install git-ai binary
57+
run: cargo install --path . --debug
58+
59+
- name: Setup git-ai configuration
60+
run: |
61+
git ai hook install
62+
git ai config set openai-api-key ${{ secrets.OPENAI_API_KEY }}
63+
git ai config set model gpt-4.1-nano
4364
44-
- run: cargo install --path . --debug
45-
- run: git ai hook install
46-
- run: git ai config set openai-api-key ${{ secrets.OPENAI_API_KEY }}
47-
- run: git ai config set model gpt-4.1
65+
- name: Verify installation
66+
run: git ai --version

0 commit comments

Comments
 (0)