CI: add Rust/Go auto-install steps for P1 and P2 agent workflows
This commit is contained in:
@@ -13,16 +13,26 @@ jobs:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
- name: Check Rust
|
||||
run: rustc --version && cargo --version
|
||||
- name: Install Rust
|
||||
run: |
|
||||
if ! command -v rustc &>/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
fi
|
||||
rustc --version && cargo --version
|
||||
|
||||
- name: Run tests
|
||||
run: cd $GITHUB_WORKSPACE/products/01-llm-cost-router && cargo test --workspace
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cd $GITHUB_WORKSPACE/products/01-llm-cost-router && cargo test --workspace
|
||||
|
||||
- name: Clippy
|
||||
run: cd $GITHUB_WORKSPACE/products/01-llm-cost-router && cargo clippy --workspace -- -D warnings
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cd $GITHUB_WORKSPACE/products/01-llm-cost-router && cargo clippy --workspace -- -D warnings
|
||||
|
||||
- name: Format check
|
||||
run: cd $GITHUB_WORKSPACE/products/01-llm-cost-router && cargo fmt --check
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cd $GITHUB_WORKSPACE/products/01-llm-cost-router && cargo fmt --check
|
||||
|
||||
@@ -13,16 +13,25 @@ jobs:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
- name: Check Go
|
||||
run: go version
|
||||
- name: Install Go
|
||||
run: |
|
||||
if ! command -v go &>/dev/null; then
|
||||
curl -sL https://go.dev/dl/go1.22.12.linux-amd64.tar.gz | tar -C /usr/local -xzf - 2>/dev/null || \
|
||||
curl -sL https://go.dev/dl/go1.22.12.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf -
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Test agent
|
||||
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/agent && go test ./...
|
||||
run: |
|
||||
export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
|
||||
cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/agent && go test ./...
|
||||
|
||||
- name: Vet
|
||||
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/agent && go vet ./...
|
||||
run: |
|
||||
export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
|
||||
cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/agent && go vet ./...
|
||||
|
||||
saas:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -30,7 +39,6 @@ jobs:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
- name: Install deps
|
||||
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/saas && npm ci --include=dev
|
||||
|
||||
Reference in New Issue
Block a user