Skip to content
Open
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
47 changes: 47 additions & 0 deletions .github/workflows/pixel_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Pixel Schema Validation

on:
push:
branches: [develop]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed, validation should only run on PR commits and not when the PR is merged. The PR won’t be merged if there are lint issues.

pull_request:

jobs:
pixel-validation:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x

- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Checkout internal-github-asana-utils repo
uses: actions/checkout@v4
with:
token: ${{ secrets.DAXMOBILE_ANDROID_AUTOMATION }}
path: internal-github-asana-utils
repository: duckduckgo/internal-github-asana-utils

- name: Install dependencies
run: npm ci --verbose
working-directory: PixelDefinitions

- name: Lint
run: npm run lint || (npm run lint.fix; git diff; echo 'Pixel lint check failed, review diff above or run "npm run lint.fix"'; exit 1)
working-directory: PixelDefinitions

- name: Run pixel validation
run: npm run validate-defs-without-formatting -- -g ../internal-github-asana-utils/user_map.yml
working-directory: PixelDefinitions

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@ report
!/node_modules/@duckduckgo/content-scope-scripts/build/android/
!/node_modules/@duckduckgo/content-scope-scripts/build/android/pages/
/node_modules/@duckduckgo/content-scope-scripts/build/android/pages/*
!/node_modules/@duckduckgo/content-scope-scripts/build/android/pages/duckplayer/
!/node_modules/@duckduckgo/content-scope-scripts/build/android/pages/duckplayer/

# Pixel processing results
PixelDefinitions/pixel_processing_results/*
PixelDefinitions/node_modules/
1 change: 1 addition & 0 deletions PixelDefinitions/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.md
1 change: 1 addition & 0 deletions PixelDefinitions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For information about documenting pixels and validating them, see https://github.com/duckduckgo/pixel-schema/blob/main/README.md
5 changes: 5 additions & 0 deletions PixelDefinitions/asana_notify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"assignee": "ladamski",
"followers": ["nshuba"],
"tagPixelOwners": false
}
1 change: 1 addition & 0 deletions PixelDefinitions/ignore_params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 5 additions & 0 deletions PixelDefinitions/native_experiments.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// This file will define pixels sent by the native experiments framework
"defaultSuffixes": ["form_factor"],
"activeExperiments": {}
}
Loading
Loading