Add support for customizing OpenAI endpoint #67
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
tags: ["**[0-9]+.[0-9]+.[0-9]+*"] | |
# Make sure CI fails on all warnings. | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
check-dnc: | |
name: DNC comments | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install ripgrep | |
- run: scripts/dnc.sh | |
test: | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
sudo apt-get update | |
sudo apt install libxcb-xfixes0-dev | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
- run: cargo test --all-features | |
e2e-tests: | |
strategy: | |
fail-fast: true | |
matrix: | |
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
python-version: ["3.10"] | |
name: E2E tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install libxcb-xfixes0-dev | |
- run: cargo build --release | |
name: Build binary | |
- name: Run E2E tests | |
run: ./scripts/e2e-tests.sh | |
env: | |
OPENAI_API_KEY_E2E: ${{ secrets.OPENAI_API_KEY_E2E }} | |
linting: | |
name: Linting and formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Rustfmt Check | |
uses: actions-rust-lang/rustfmt@v1 | |
- uses: actions/checkout@v4 | |
- name: Run Clippy | |
run: cargo clippy --all-targets --all-features |