Fix sitemap.xml 404 on Azure Container Apps (nginx missing explicit route) #1316
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: Code Coverage | |
| on: | |
| push: | |
| branches: [main, 'release/*', 'feature/*'] | |
| pull_request: | |
| branches: [main, 'release/*'] | |
| permissions: | |
| contents: read | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| name: Run tests and upload coverage | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: | | |
| echo "📦 Installing dependencies..." | |
| npm install | |
| echo "✅ Dependencies installed" | |
| - name: Build TypeScript | |
| run: | | |
| echo "🔨 Building TypeScript..." | |
| npm run build | |
| echo "✅ Build complete" | |
| - name: Run tests with coverage | |
| run: | | |
| echo "🧪 Running tests with coverage..." | |
| npm test -- --coverage --coverageReporters=lcov --coverageReporters=json-summary --coverageReporters=text | |
| echo "✅ Tests complete" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/lcov.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Coverage summary | |
| run: | | |
| echo "" | |
| echo "==========================================" | |
| echo "📊 Code Coverage Report" | |
| echo "==========================================" | |
| if [ -f coverage/coverage-summary.json ]; then | |
| echo "✅ Coverage data generated successfully" | |
| echo "" | |
| # Parse and display coverage percentages (single file read) | |
| node -e "const fs = require('fs'); try { const raw = fs.readFileSync('coverage/coverage-summary.json', 'utf8'); const data = JSON.parse(raw); const total = data.total; console.log('Lines: ' + total.lines.pct + '%'); console.log('Statements: ' + total.statements.pct + '%'); console.log('Functions: ' + total.functions.pct + '%'); console.log('Branches: ' + total.branches.pct + '%'); } catch (e) { console.error('⚠️ Error parsing coverage summary: ' + e); process.exit(1); }" | |
| echo "" | |
| echo "📤 Report uploaded to Codecov" | |
| else | |
| echo "⚠️ No coverage summary found" | |
| fi | |
| echo "" | |
| echo "==========================================" |