Microsoft Entra sign-in, and a self-contained Windows installer #1
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: | |
| # This repository's default branch is master; listing only main meant | |
| # push-triggered CI never actually ran. | |
| branches: [master, main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v4 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| cache-dependency-path: src/m365-security-dashboard-client/package-lock.json | |
| - name: Check API and client versions match | |
| shell: pwsh | |
| run: ./scripts/check-version.ps1 | |
| - name: Restore frontend dependencies | |
| working-directory: src/m365-security-dashboard-client | |
| run: npm ci | |
| - name: Type-check frontend | |
| working-directory: src/m365-security-dashboard-client | |
| run: npx tsc --noEmit | |
| - name: Run frontend tests | |
| working-directory: src/m365-security-dashboard-client | |
| run: npm test | |
| - name: Build frontend | |
| working-directory: src/m365-security-dashboard-client | |
| run: npm run build | |
| # Supply-chain gates. A security product should not ship on top of | |
| # known-vulnerable dependencies; fail the build rather than warn. | |
| - name: Audit npm dependencies | |
| working-directory: src/m365-security-dashboard-client | |
| run: npm audit --audit-level=high | |
| - name: Restore .NET dependencies | |
| run: dotnet restore M365SecurityAlertDashboard.sln | |
| - name: Build .NET solution | |
| run: dotnet build M365SecurityAlertDashboard.sln --configuration Release --no-restore | |
| - name: Audit NuGet dependencies | |
| run: | | |
| dotnet list M365SecurityAlertDashboard.sln package --vulnerable --include-transitive 2>&1 | tee audit.txt | |
| if grep -q "has the following vulnerable packages" audit.txt; then | |
| echo "::error::Vulnerable NuGet packages detected"; exit 1 | |
| fi | |
| - name: Run .NET tests | |
| run: dotnet test M365SecurityAlertDashboard.sln --configuration Release --no-build --verbosity normal |