git-ai 0.1.30

Git AI: Automates commit messages using ChatGPT. Stage your files, and Git AI generates the messages.
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always
  APP_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        toolchain: [nightly]
        parallelism: [4]
    steps:
      - uses: actions/checkout@v3
      - name: Cache cargo registry
        uses: actions/cache@v2
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ matrix.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.toolchain }}
          override: true
          default: true
          profile: minimal
          components: rustfmt,clippy
      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test
      - name: Build git-ai for release
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --bin git-ai
      - name: Build git-ai-hook for release
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --bin git-ai-hook
      - name: Run integration tests
        run: ./tools/test.sh
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}