|
2 | 2 | name: "Copilot Setup Steps" |
3 | 3 |
|
4 | 4 | on: |
5 | | - workflow_dispatch: |
6 | | - push: |
7 | | - paths: |
8 | | - - .github/workflows/copilot-setup-steps.yml |
9 | 5 | pull_request: |
10 | 6 | paths: |
11 | 7 | - .github/workflows/copilot-setup-steps.yml |
@@ -33,15 +29,38 @@ jobs: |
33 | 29 | - name: Checkout code |
34 | 30 | uses: actions/checkout@v5 |
35 | 31 |
|
| 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 | + |
36 | 38 | - name: Cache Rust dependencies |
37 | 39 | uses: Swatinem/rust-cache@v2 |
38 | 40 | with: |
39 | 41 | cache-on-failure: true |
40 | 42 |
|
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 |
43 | 64 |
|
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