doc: update workflow to create config.yaml #63
Workflow file for this run
This file contains hidden or 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: Run Test | |
on: | |
schedule: | |
# Run nightly at 2:00 AM UTC | |
- cron: '0 2 * * *' | |
workflow_dispatch: # Allow manual triggering | |
pull_request: # Run on all pull requests | |
jobs: | |
test-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.85 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.24' | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
make \ | |
build-essential \ | |
pkg-config | |
- name: Cache Rust dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
candle-binding/target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} | |
- name: Cache Go dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- name: Build Rust library | |
run: make rust | |
- name: Install HuggingFace CLI | |
run: | | |
pip install -U "huggingface_hub[cli]" | |
- name: Download models | |
run: make download-models | |
- name: Run semantic router tests | |
run: make test | |
env: | |
CGO_ENABLED: 1 | |
LD_LIBRARY_PATH: ${{ github.workspace }}/candle-binding/target/release | |
- name: Upload test artifacts on failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs | |
path: | | |
**/*.log | |
**/test-output.* | |
retention-days: 7 | |
- name: Notify on failure | |
if: failure() | |
run: | | |
echo "::error::Test and build failed. Check the workflow run for details." | |
# Trigger Docker publishing on successful nightly runs | |
publish-docker: | |
needs: test-and-build | |
if: success() && github.event_name == 'schedule' | |
uses: ./.github/workflows/docker-publish.yml | |
with: | |
tag_suffix: nightly-$(date +'%Y%m%d') | |
is_nightly: true | |
secrets: inherit |