Skip to content

Commit f766e96

Browse files
committed
feat(action): added extension's action file
1 parent c9d4104 commit f766e96

3 files changed

Lines changed: 59 additions & 1 deletion

File tree

.github/workflows/base.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- 'third-party/**'
2020
- 'toolchains/**'
2121
- '.github/workflows/web-**'
22+
- 'extensions/**'
2223

2324
name: Base GitHub Action for Check, Test and Lints
2425

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Extensions Base Check, Test and Lints
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/extensions-**'
9+
- 'extensions/**'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
clippy:
17+
name: Clippy Check
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
project:
23+
- extensions/observatory
24+
- extensions/rag/chat
25+
- extensions/rag/index
26+
defaults:
27+
run:
28+
working-directory: ${{ matrix.project }}
29+
env:
30+
CARGO_TERM_COLOR: always
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
37+
- name: Run cargo clippy
38+
run: |
39+
cargo build
40+
## cargo fmt --all -- --check
41+
cargo clippy --all-targets --all-features --no-deps -- -D warnings
42+
43+
test:
44+
name: Full Test
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
49+
with:
50+
submodules: recursive
51+
lfs: true
52+
53+
- name: Run cargo test
54+
run: |
55+
cargo test --manifest-path extensions/observatory/Cargo.toml --all-features --no-fail-fast -- --nocapture
56+
cargo test --manifest-path extensions/rag/chat/Cargo.toml --all-features --no-fail-fast -- --nocapture
57+
cargo test --manifest-path extensions/rag/index/Cargo.toml --all-features --no-fail-fast -- --nocapture

extensions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Rag is a framework for retrieval-augmented generation based on large models.
1+
Rag is a framework for retrieval-augmented generation based on large models.

0 commit comments

Comments
 (0)