Nightly Build #156
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: Nightly Build | |
| on: | |
| schedule: | |
| # Run every day at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # Allow manual triggering | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| nightly-test: | |
| name: Nightly Comprehensive Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 # Set timeout to 30 minutes for comprehensive nightly testing | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Check code formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy with all warnings | |
| run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::too-many-arguments | |
| - name: Run unit tests | |
| env: | |
| RUST_LOG: debug | |
| run: make test-unit | |
| - name: Run integration tests | |
| env: | |
| RUST_LOG: debug | |
| run: make test-integration | |
| - name: Run UI tests | |
| env: | |
| RUST_LOG: debug | |
| run: make test-ui | |
| - name: Build release version | |
| run: cargo build --release | |
| - name: Test Docker build | |
| run: | | |
| docker build -t sortingoffice:nightly . | |
| docker run --rm sortingoffice:nightly --help || true | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-build | |
| path: | | |
| target/release/sortingoffice | |
| retention-days: 30 | |
| dependency-update: | |
| name: Check for Dependency Updates | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 # Set timeout to 15 minutes for dependency checks | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Check for outdated dependencies | |
| run: | | |
| cargo install cargo-outdated | |
| cargo outdated --exit-code 1 || echo "Some dependencies are outdated" | |
| - name: Check for security vulnerabilities | |
| run: | | |
| cargo install cargo-audit | |
| cargo audit |