-
Notifications
You must be signed in to change notification settings - Fork 0
feat(KLEF): Set up GitHub Actions for various code quality checks #1
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0cb4ed7
feat: Set up GitHub Actions for various code quality checks and PR po…
isaacwallace123 12be913
test: implement Playwright end-to-end tests for documentation site fe…
isaacwallace123 18f0d96
chore: update pnpm dependencies
isaacwallace123 72d377c
feat: Add GitHub Actions workflows for label policy, MDX linting, typ…
isaacwallace123 262c496
feat: Add comprehensive CI/CD workflows for linting, type checking, s…
isaacwallace123 86c81fd
chore: Add GitHub labeler configuration, update yamllint ignores, and…
isaacwallace123 126cd00
test: add Playwright tests for search functionality.
isaacwallace123 c3c6e63
feat: add GitHub Actions workflow for end-to-end tests.
isaacwallace123 625038e
ci: add GitHub Actions workflow to run E2E tests on pull requests and…
isaacwallace123 4eeb2a3
ci: Add GitHub Actions workflow for running end-to-end tests.
isaacwallace123 4f14d26
test: add Playwright tests for documentation search functionality
isaacwallace123 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,6 @@ | ||
| { | ||
| "extends": "next/core-web-vitals", | ||
| "rules": { | ||
| "react/no-unescaped-entities": "off" | ||
| } | ||
| } |
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,30 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-types/cspell.schema.json", | ||
| "version": "0.2", | ||
| "language": "en", | ||
| "words": [ | ||
| "kleff", | ||
| "kleffio", | ||
| "argocd", | ||
| "gameserver", | ||
| "keycloak", | ||
| "mdx", | ||
| "pnpm", | ||
| "tailwindcss", | ||
| "rehype", | ||
| "remark", | ||
| "shiki", | ||
| "nextjs", | ||
| "preconnect", | ||
| "prefetch" | ||
| ], | ||
| "ignorePaths": [ | ||
| "node_modules", | ||
| ".github", | ||
| "*.json", | ||
| "*.yaml", | ||
| "*.yml", | ||
| "*.ts", | ||
| "*.tsx" | ||
| ] | ||
| } |
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,21 @@ | ||
| --- | ||
| docs: | ||
| - changed-files: | ||
| - any-glob-to-any-file: "src/**/*.mdx" | ||
|
|
||
| feature: | ||
| - changed-files: | ||
| - any-glob-to-any-file: "src/components/**" | ||
| - any-glob-to-any-file: "src/app/**/*.tsx" | ||
|
|
||
| chore: | ||
| - changed-files: | ||
| - any-glob-to-any-file: ".github/**" | ||
| - any-glob-to-any-file: "package.json" | ||
| - any-glob-to-any-file: "pnpm-lock.yaml" | ||
| - any-glob-to-any-file: "*.config.*" | ||
|
|
||
| tests: | ||
| - changed-files: | ||
| - any-glob-to-any-file: "tests/**" | ||
| - any-glob-to-any-file: "playwright.config.*" |
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,9 @@ | ||
| [ | ||
| { "name": "feature", "color": "0075ca", "description": "New feature or enhancement" }, | ||
| { "name": "bugfix", "color": "d73a4a", "description": "Bug fix" }, | ||
| { "name": "chore", "color": "e4e669", "description": "Maintenance or tooling" }, | ||
| { "name": "docs", "color": "0075ca", "description": "Documentation changes" }, | ||
| { "name": "refactor", "color": "cfd3d7", "description": "Code refactor without behavior change" }, | ||
| { "name": "security", "color": "ee0701", "description": "Security related change" }, | ||
| { "name": "tests", "color": "bfd4f2", "description": "Test additions or updates" } | ||
| ] |
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,25 @@ | ||
| --- | ||
| name: Action Lint | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
| checks: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| actionlint: | ||
| name: Action Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: reviewdog/action-actionlint@v1 | ||
| with: | ||
| actionlint_flags: "-color" | ||
This file was deleted.
Oops, something went wrong.
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,49 @@ | ||
| --- | ||
| name: E2E Tests | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| e2e: | ||
| name: E2E Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Install Playwright browsers | ||
| run: pnpm playwright install chromium --with-deps | ||
|
|
||
| - name: Build | ||
| run: pnpm build | ||
|
|
||
| - name: Run E2E tests | ||
| run: pnpm test:e2e | ||
|
|
||
| - name: Upload test report | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report/ | ||
| retention-days: 7 |
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,55 @@ | ||
| --- | ||
| name: Label Policy | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled, unlabeled] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
isaacwallace123 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| jobs: | ||
| label-sync: | ||
| name: Label Sync | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: EndBug/label-sync@v2 | ||
| with: | ||
| config-file: .github/labels.json | ||
isaacwallace123 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| delete-other-labels: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| auto-label: | ||
| name: Auto Label | ||
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false | ||
| needs: [label-sync] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/labeler@v5 | ||
| with: | ||
| configuration-path: .github/labeler.yml | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
isaacwallace123 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| require-label: | ||
| name: Require Label | ||
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false | ||
| needs: [auto-label] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const required = ['feature','bugfix','chore','docs','refactor','security','tests']; | ||
| const labels = await github.paginate( | ||
| github.rest.issues.listLabelsOnIssue, | ||
| { owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number } | ||
| ); | ||
| const present = labels.map(l => l.name); | ||
| const ok = required.some(l => present.includes(l)); | ||
| if (!ok) core.setFailed(`PR must include at least one of: ${required.join(', ')}`); | ||
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,29 @@ | ||
| --- | ||
| name: Lint | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm lint |
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,45 @@ | ||
| --- | ||
| name: MDX Lint | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| mdx-lint: | ||
| name: MDX Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| - name: Install remark | ||
| run: | | ||
| npm install --global \ | ||
| remark-cli \ | ||
| remark-mdx \ | ||
| remark-preset-lint-recommended \ | ||
| remark-lint-no-duplicate-headings \ | ||
| remark-lint-heading-increment \ | ||
| remark-lint-no-empty-sections \ | ||
| remark-lint-no-undefined-references | ||
| - name: Lint MDX files | ||
| run: | | ||
| remark \ | ||
| --use remark-mdx \ | ||
| --use remark-preset-lint-recommended \ | ||
| --use remark-lint-no-duplicate-headings \ | ||
| --use remark-lint-heading-increment \ | ||
isaacwallace123 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --use remark-lint-no-empty-sections \ | ||
| --use remark-lint-no-undefined-references \ | ||
| --ext mdx,md \ | ||
| --frail \ | ||
| . | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.