-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Initial support for pixel registry #6878
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
base: develop
Are you sure you want to change the base?
Changes from 11 commits
64ecd0b
a9c7f14
4ad8c15
d6603fe
8831091
7e35fd0
700ea42
b60cb2b
3e34633
f48d5be
59ad71b
b749c41
992cc96
12fbc30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Pixel Schema Validation | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
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 | ||
|
||
# Lint step for push (fail on error), for PRs run fix instead | ||
- name: Check or Fix lint | ||
id: lint | ||
run: | | ||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
npm run lint.fix || true | ||
else | ||
npm run lint | ||
|
||
fi | ||
working-directory: PixelDefinitions | ||
|
||
# Commit and push changes if lint.fix was run and made changes | ||
- name: Commit and push linter fixes (PRs only) | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add PixelDefinitions/ | ||
if ! git diff --cached --quiet; then | ||
git commit -m "chore: auto-fix lint errors" | ||
git push | ||
fi | ||
|
||
|
||
- name: Run pixel validation | ||
run: npm run validate-defs-without-formatting -- -g ../internal-github-asana-utils/user_map.yml | ||
working-directory: PixelDefinitions | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"assignee": "ladamski", | ||
"followers": ["nshuba"], | ||
"tagPixelOwners": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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": {} | ||
} |
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a personal preference here, other than to note that: