Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ga-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow for DevTools Compliance

name: DevTools Compliance

on:
pull_request:
types:
[
opened,
edited,
synchronize,
reopened,
labeled,
unlabeled,
assigned,
unassigned,
]

jobs:
check-compliance:
name: Check DevTools Compliance
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Show PR Labels and Assignees
run: |
echo "PR Labels: ${{ toJson(github.event.pull_request.labels) }}"
echo "PR Assignees: ${{ toJson(github.event.pull_request.assignees) }}"

- name: Verify PR Assignee
run: |
if [ "${{ toJson(github.event.pull_request.assignees) }}" == "[]" ]; then
echo "👮 This PR does not have any assignees. Please assign at least one assignee."
exit 1
fi

- name: Verify PR Label
run: |
if [ "${{ toJson(github.event.pull_request.labels) }}" == "[]" ]; then
echo "👮 This PR does not have any labels. Please assign at least one label."
exit 1
fi
continue-on-error: true
56 changes: 56 additions & 0 deletions .github/workflows/ga-linter-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Workflow for DevTools CI/CD
# This workflow runs linting and formatting checks on pull requests.
# It ensures that the code adheres to style guidelines and is free of linting errors.

name: DevTools CI/CD

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
lint-and-format:
name: Lint and Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Cache Deno dependencies
uses: actions/cache@v4
with:
path: |
~/.deno
~/node_modules
~/.cache/deno

key: ${{ runner.os }}-deno-v2-${{ hashFiles('deno.json') }}

- name: 🔍 Get all changed files
id: changed-file-list
run: |
echo "changed_files=$(git diff --name-only --diff-filter=ACMRT --merge-base origin/master | xargs)" >> $GITHUB_OUTPUT

- name: Run linter
if: steps.changed-file-list.outputs.changed_files != ''
run: deno task lint --permit-no-files --compact ${{ steps.changed-file-list.outputs.changed_files }}

- name: Run formatter
if: steps.changed-file-list.outputs.changed_files != ''
run: deno task fmt --permit-no-files --check ${{ steps.changed-file-list.outputs.changed_files }}

- name: Run check
if: steps.changed-file-list.outputs.changed_files != ''
run: deno check --allow-import

- name: Run tests
if: steps.changed-file-list.outputs.changed_files != ''
run: deno test -A --no-check --env-file=.env-dev
Loading