feat(api): recommendations api #6
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/** | |
| merge_group: | |
| types: | |
| - checks_requested | |
| pull_request: | |
| branches: | |
| - main | |
| - release/** | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Maximize build space | |
| 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 rm -rf /opt/hostedtoolcache/go | |
| sudo rm -rf /usr/local/share/powershell | |
| 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} | |
| sudo apt purge -y \ | |
| firefox \ | |
| google-chrome-stable \ | |
| microsoft-edge-stable | |
| df -h | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Cache Theseus Postgresql Installation | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.theseus/postgresql | |
| key: ${{ runner.os }}-theseus-postgresql-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Format | |
| run: cargo fmt --check | |
| - name: Check | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # for embedded postgresql | |
| run: cargo check | |
| - name: Clippy | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # for embedded postgresql | |
| run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used | |
| - name: Start minio | |
| run: | | |
| docker compose -f etc/deploy/compose/compose-minio.yaml up -d --wait | |
| - name: Test | |
| run: cargo test --all-features -- --nocapture | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # for embedded postgresql | |
| RUST_LOG: warn,sqlx=error,sea_orm=error | |
| - name: Export and Validate Generated Openapi Spec | |
| run: | | |
| cargo xtask openapi | |
| if ! git diff --quiet; then | |
| echo "::error::Uncommitted changes (run 'cargo xtask openapi' after making api changes)" | |
| exit 1 | |
| fi | |
| - name: Ensure schemas are up-to-date | |
| run: | | |
| cargo xtask generate-schemas | |
| if ! git diff --quiet; then | |
| echo "::error::Uncommitted changes (run 'cargo xtask generate-schemas' after making changes to the models)" | |
| exit 1 | |
| fi | |
| - name: Check the docs | |
| run: | | |
| cd docs/book | |
| npm ci | |
| make all |