chore(deps): bump tower-http from 0.6.11 to 0.7.0 #123
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, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_VERSION: "1.88" | |
| NODE_VERSION: "20" | |
| jobs: | |
| # =========================================== | |
| # Backend Tests & Build | |
| # =========================================== | |
| backend-test: | |
| name: Backend - Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| components: rustfmt, clippy | |
| - name: Cache cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev | |
| - name: Run cargo fmt check | |
| run: cargo fmt --all -- --check | |
| - name: Run cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run tests | |
| run: cargo test --all-features | |
| backend-build: | |
| name: Backend - Build | |
| runs-on: ubuntu-latest | |
| needs: backend-test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| components: rustfmt, clippy | |
| - name: Cache cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev | |
| - name: Build release | |
| run: cargo build --release | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cryptoscope-backend | |
| path: target/release/cryptoscope | |
| retention-days: 7 | |
| # =========================================== | |
| # Frontend Tests & Build | |
| # =========================================== | |
| frontend-lint: | |
| name: Frontend - Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: ./frontend | |
| run: npm ci | |
| - name: Run ESLint | |
| working-directory: ./frontend | |
| run: npm run lint | |
| frontend-build: | |
| name: Frontend - Build | |
| runs-on: ubuntu-latest | |
| needs: frontend-lint | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: ./frontend | |
| run: npm ci | |
| - name: Run build | |
| working-directory: ./frontend | |
| run: npm run build | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cryptoscope-frontend | |
| path: frontend/.next | |
| retention-days: 7 | |
| # =========================================== | |
| # Docker Build | |
| # =========================================== | |
| docker-build: | |
| name: Docker - Build Images | |
| runs-on: ubuntu-latest | |
| needs: [backend-build, frontend-build] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build backend image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./deployment/docker/Dockerfile.backend | |
| push: false | |
| tags: cryptoscope-backend:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build frontend image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./deployment/docker/Dockerfile.frontend | |
| push: false | |
| tags: cryptoscope-frontend:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # =========================================== | |
| # Docker Compose Validation | |
| # =========================================== | |
| docker-compose-check: | |
| name: Docker Compose - Validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Validate docker-compose.yml | |
| run: | | |
| docker compose -f deployment/docker/docker-compose.yml config --quiet | |
| env: | |
| DOCKER_COMPOSE_VERSION: "v2.20.0" | |
| - name: Validate docker-compose.dev.yml | |
| run: | | |
| docker compose -f deployment/docker/docker-compose.dev.yml config --quiet |