Skip to content

Implement strategy pattern for generation fallbacks #506

Implement strategy pattern for generation fallbacks

Implement strategy pattern for generation fallbacks #506

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Setup nightly toolchain
uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
toolchain: nightly
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
test:
needs: lint
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest]
rust: [nightly, stable]
runs-on: ${{ matrix.os }}
continue-on-error: false
steps:
- uses: actions/checkout@v5
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal
- name: Install fish (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install fish
- name: Install fish (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install fish
- name: Run integration tests
run: fish ./scripts/integration-tests
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test