Merge pull request #18 from brckfrc/renovate/non-major-updates #161
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
| # Chord CI Pipeline | |
| # Runs on every push and pull request | |
| # Tests, lints, and validates builds | |
| # | |
| # Skip CI: Use [skip ci], [ci skip], [no ci], [skip actions], or [actions skip] in commit message | |
| # Example: git commit -m "docs: update README [skip ci]" | |
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'chord_roadmap.md' | |
| - '.cursorrules' | |
| - 'LICENSE' | |
| pull_request: | |
| branches: [main, develop] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'chord_roadmap.md' | |
| - '.cursorrules' | |
| - 'LICENSE' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOTNET_VERSION: "9.0.x" | |
| jobs: | |
| # Backend CI Job | |
| backend: | |
| name: Backend (.NET) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.1.0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.4.0 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| cache: true | |
| cache-dependency-path: backend/**/*.csproj | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Run tests | |
| run: dotnet test --no-build --configuration Release --verbosity normal | |
| # Frontend CI Job | |
| frontend: | |
| name: Frontend (React) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.1.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6.5.0 | |
| with: | |
| # Reads .nvmrc so CI and local development can never drift apart. | |
| node-version-file: .nvmrc | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linter | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build | |
| # Docker build validation (no push) | |
| docker-build: | |
| name: Docker Build Validation | |
| runs-on: ubuntu-latest | |
| needs: [backend, frontend] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.1.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3.12.0 | |
| - name: Build Backend Image (cache only) | |
| uses: docker/build-push-action@v6.19.2 | |
| with: | |
| context: ./backend | |
| file: ./backend/Dockerfile | |
| push: false | |
| cache-from: | | |
| type=gha,scope=ci-backend | |
| type=registry,ref=ghcr.io/${{ github.repository }}/api:latest | |
| cache-to: type=gha,mode=max,scope=ci-backend | |
| - name: Build Frontend Image (cache only) | |
| uses: docker/build-push-action@v6.19.2 | |
| with: | |
| context: ./frontend | |
| file: ./frontend/Dockerfile | |
| push: false | |
| cache-from: | | |
| type=gha,scope=ci-frontend | |
| type=registry,ref=ghcr.io/${{ github.repository }}/frontend:latest | |
| cache-to: type=gha,mode=max,scope=ci-frontend | |