feat: implement AuthTokens class with from_json method and update API… #132
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: Rust | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| OLLAMA_MODEL: tinyllama | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| mongodb: | |
| image: mongo | |
| ports: | |
| - 27017:27017 | |
| mqtt: | |
| image: eclipse-mosquitto | |
| ports: | |
| - 1883:1883 | |
| ollama: | |
| image: ollama/ollama | |
| ports: | |
| - 11434:11434 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.95.0 | |
| - name: Install dependencies | |
| run: | | |
| wget -O clips_642.zip https://sourceforge.net/projects/clipsrules/files/CLIPS/6.4.2/clips_core_source_642.zip/download | |
| unzip clips_642.zip -d clips_temp | |
| mkdir clips_source | |
| mv clips_temp/clips_core_source_642/core/* clips_source/ | |
| rm -rf clips_temp clips_642.zip | |
| rustup component add llvm-tools-preview | |
| cargo install cargo-llvm-cov --locked | |
| - name: Download Ollama model | |
| run: | | |
| docker exec ${{ job.services.ollama.id }} ollama pull ${{ env.OLLAMA_MODEL }} | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests with coverage | |
| run: cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info |