Skip to content

Add GitHub Actions steps for Rust linting and fish shell install #48

Add GitHub Actions steps for Rust linting and fish shell install

Add GitHub Actions steps for Rust linting and fish shell install #48

---
name: "Copilot Setup Steps"
on:
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}-copilot-setup-steps
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
packages: write
pull-requests: write
issues: write
checks: write
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Rust nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install fish shell (for integration tests)
run: sudo apt-get update && sudo apt-get install -y fish
- name: Verify formatting compliance
run: cargo fmt --check
- name: Run clippy to catch issues early
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests to validate codebase
run: cargo test --quiet
- name: Install git-ai binary
run: cargo install --path . --debug
- name: Setup git-ai configuration
run: |
git ai hook install
git ai config set openai-api-key ${{ secrets.OPENAI_API_KEY }}
git ai config set model gpt-4.1
- name: Verify installation
run: git ai --version