-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions CI with tests, linting, and security scanning #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
trevwilson
merged 16 commits into
master
from
claude-session/feature-github-actions-ci-20260120-2336
Jan 21, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
803db86
Add GitHub Actions CI with tests, linting, and security scanning
trevwilson ea8c0d7
Include master branch in CI triggers
trevwilson 5084f94
Add GitHub Actions CI, migrate to pnpm, fix lint errors
trevwilson 0473d05
Address CI code review feedback
trevwilson 7777e24
Trigger CI
trevwilson ec217b9
Fix E2E migration race condition, disable CodeQL temporarily
trevwilson d3a7471
Fix ESLint errors: conditional hooks and setState-in-effect
trevwilson 96cd8ea
Test CI with unsuppressed set-state-in-effect rule
trevwilson 741da87
Fix all ESLint warnings: trust the type system
trevwilson a2db170
Enable React Compiler, fix DATA_FLOW diagram
trevwilson 8f58543
Fix E2E test timeouts: memoize hook return values
trevwilson 331664c
Share API server across E2E test classes
trevwilson 2072c9e
Add React app warmup before E2E tests
trevwilson 47b71bc
Make E2E database clearing dynamic via EF Core model
trevwilson 7c2d861
Remove unused StopAsync from E2E fixture
trevwilson 45eb192
Address CodeRabbit review: resource disposal and fail-fast
trevwilson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| version: 2 | ||
| updates: | ||
| # Frontend npm dependencies | ||
| - package-ecosystem: "npm" | ||
| directory: "/frontend" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| # Group minor/patch updates to reduce PR noise | ||
| minor-and-patch: | ||
| patterns: ["*"] | ||
| update-types: ["minor", "patch"] | ||
|
|
||
| # Backend NuGet dependencies | ||
| - package-ecosystem: "nuget" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| minor-and-patch: | ||
| patterns: ["*"] | ||
| update-types: ["minor", "patch"] | ||
|
|
||
| # GitHub Actions | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| actions-updates: | ||
| patterns: ["*"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| backend: | ||
| name: Backend | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '10.0.x' | ||
|
|
||
| - name: Restore dependencies | ||
| run: dotnet restore | ||
|
|
||
| - name: Build | ||
| run: dotnet build --no-restore --configuration Release | ||
|
|
||
| - name: Run unit tests | ||
| run: dotnet test --project tests/OpenGTD.Tests --no-build --configuration Release --verbosity normal | ||
|
|
||
| - name: Run integration tests | ||
| run: dotnet test --project tests/OpenGTD.IntegrationTests --no-build --configuration Release --verbosity normal | ||
|
|
||
| frontend: | ||
| name: Frontend | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: frontend | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'pnpm' | ||
| cache-dependency-path: frontend/pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Lint | ||
| run: pnpm run lint | ||
|
|
||
| - name: Type check | ||
| run: pnpm exec tsc --noEmit | ||
|
|
||
| - name: Run tests | ||
| run: pnpm run test:run | ||
|
|
||
| - name: Build | ||
| run: pnpm run build | ||
|
|
||
| e2e: | ||
| name: E2E Tests | ||
| needs: [backend, frontend] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '10.0.x' | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'pnpm' | ||
| cache-dependency-path: frontend/pnpm-lock.yaml | ||
|
|
||
| - name: Restore .NET dependencies | ||
| run: dotnet restore | ||
|
|
||
| - name: Build backend | ||
| run: dotnet build --no-restore --configuration Release | ||
|
|
||
| - name: Install frontend dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| working-directory: frontend | ||
|
|
||
| - name: Install Playwright browsers | ||
| run: pwsh tests/OpenGTD.E2E/bin/Release/net10.0/playwright.ps1 install --with-deps chromium | ||
|
|
||
| - name: Run E2E tests | ||
| run: dotnet test --project tests/OpenGTD.E2E --no-build --configuration Release --verbosity normal |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: CodeQL | ||
|
|
||
| # Disabled until Code Scanning is enabled in repository settings | ||
| # See: https://github.com/trevwilson/GTDApp/settings/security_analysis | ||
| on: | ||
| workflow_dispatch: | ||
| # Uncomment these when Code Scanning is enabled: | ||
| # push: | ||
| # branches: [main, master] | ||
| # pull_request: | ||
| # branches: [main, master] | ||
| # schedule: | ||
| # - cron: '0 0 * * 0' | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| actions: read | ||
| contents: read | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: ['csharp', 'javascript-typescript'] | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET | ||
| if: matrix.language == 'csharp' | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '10.0.x' | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
|
|
||
| - name: Build .NET | ||
| if: matrix.language == 'csharp' | ||
| run: dotnet build --configuration Release | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v3 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" | ||
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.