Skip to content

Commit

Permalink
Switch perf to studies (#1243)
Browse files Browse the repository at this point in the history
  • Loading branch information
atuchin-m authored Oct 28, 2024
1 parent 5fb21c8 commit 6b8ba27
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Test Python Generator
name: Test Perf Field Trials Generator

on:
pull_request:
paths:
- 'seed/**'
- 'studies/**'
- 'src/**'

jobs:
test:
Expand All @@ -23,9 +25,6 @@ jobs:
- name: Install requirements
run: pip install -r seed/requirements.txt

- name: Serialize seed
run: python seed/serialize.py seed/seed.json

- name: Generate testing_fieldtrials.json (HEAD)
run: python3 seed/fieldtrials_testing_config_generator.py
--use-current-branch
Expand All @@ -49,8 +48,3 @@ jobs:
--target-channel NIGHTLY
--output fieldtrial_testing_config.json
--output-revision brave-variations-revision.txt

- name: fmt seed
run: |
python3 ./.github/ci/griffin-study-utils.py fmt
git diff --no-ext-diff --exit-code seed/seed.json
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.*/**
!/.github/**
seed/seed.json
seed/seed.archived.json
src/proto/generated/*
src/test/data/**/*unformatted*
src/web/css/bootstrap.min.css
6 changes: 3 additions & 3 deletions seed/fieldtrials_testing_config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ def _get_variations_seed(revision: str):
files_output = subprocess.check_output(
['git', 'show', f'{revision}:{SEED_FOLDER}']).decode()
for filename in files_output.splitlines()[1:]:
if filename.endswith('.json'):
if filename.endswith('.json5'):
print('saving', filename)
with open(os.path.join(tmp_dir, filename), 'wb') as f:
content = subprocess.check_output(
['git', 'show', f'{revision}:{SEED_FOLDER}/{filename}'])
f.write(content)

subprocess.check_output([NPM_EXECUTABLE, 'run', 'seed_tools', '--',
'create_seed', tmp_dir, seed_path])
subprocess.check_output([NPM_EXECUTABLE, 'run', 'seed_tools', 'create', '--',
tmp_dir, seed_path])


seed = variations_seed_pb2.VariationsSeed()
Expand Down
File renamed without changes.

0 comments on commit 6b8ba27

Please sign in to comment.