forked from trustification/trustify
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (59 loc) · 1.73 KB
/
ci-ai.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: ci-ai
on:
workflow_dispatch:
pull_request:
# push:
# branches:
# - main
# merge_group:
# types:
# - checks_requested
# pull_request:
# branches:
# - main
env:
CARGO_TERM_COLOR: always
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
# os: [ ubuntu-latest, macos-13, macos-latest ]
steps:
- name: Maximize build space
if: matrix.os == 'ubuntu-latest'
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo rm -Rf ${JAVA_HOME_8_X64}
sudo rm -Rf ${JAVA_HOME_11_X64}
sudo rm -Rf ${JAVA_HOME_17_X64}
sudo rm -Rf ${RUBY_PATH}
df -h
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install ollama
run: curl -fsSL https://ollama.com/install.sh | sh
- name: Run ollama
run: |
ollama serve &
ollama pull llama3.1:8b
# - name: Format
# run: cargo fmt --check
# - name: Check
# run: cargo check
# - name: Clippy
# run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used
- name: Test
run: cargo test -p trustify-module-fundamental completion -- --nocapture
env:
RUST_LOG: trustify_module_fundamental::ai=info,langchain_rust=info
OPENAI_API_KEY: ollama
OPENAI_API_BASE: http://localhost:11434/v1
OPENAI_MODEL: llama3.1:8b