chore(renovate): group leptos related PRs and auto update Cargo.lock #7
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: CI | |
| on: | |
| push: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| DATABASE_URL: sqlite:flashy.db | |
| jobs: | |
| lint: | |
| name: Format & Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt, clippy | |
| targets: wasm32-unknown-unknown | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Install SQLx CLI | |
| run: cargo install sqlx-cli --no-default-features --features sqlite --locked | |
| env: | |
| CARGO_TARGET_DIR: /tmp/sqlx-build | |
| - name: Create database and run migrations | |
| run: | | |
| sqlx database create | |
| sqlx migrate run | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install SQLx CLI | |
| run: cargo install sqlx-cli --no-default-features --features sqlite --locked | |
| env: | |
| CARGO_TARGET_DIR: /tmp/sqlx-build | |
| - name: Create database and run migrations | |
| run: | | |
| sqlx database create | |
| sqlx migrate run | |
| - name: Run tests | |
| run: cargo test --all-features | |
| build: | |
| name: Build (Leptos SSR) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install cargo-leptos | |
| run: cargo install cargo-leptos --locked | |
| - name: Install SQLx CLI | |
| run: cargo install sqlx-cli --no-default-features --features sqlite --locked | |
| env: | |
| CARGO_TARGET_DIR: /tmp/sqlx-build | |
| - name: Create database and run migrations | |
| run: | | |
| sqlx database create | |
| sqlx migrate run | |
| - name: Build with cargo-leptos | |
| run: cargo leptos build --release | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: leptos-build | |
| path: | | |
| target/release/flashy | |
| target/site/ | |
| retention-days: 3 | |
| security-audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Run security audit | |
| run: cargo audit | |
| all-checks-passed: | |
| name: All Checks Passed | |
| runs-on: ubuntu-latest | |
| needs: [lint, test, build, security-audit] | |
| if: always() | |
| steps: | |
| - name: Check if all jobs passed | |
| run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then | |
| echo "One or more checks failed" | |
| exit 1 | |
| fi | |
| echo "All checks passed successfully!" |