Skip to content
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

tests: upgrade protobuf test to use python 3 #14557

Merged
merged 2 commits into from
Nov 22, 2022
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
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
- name: Set up protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3
with:
version: '3.7.1'
version: '3.20'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 2.7
python-version: 3
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install protobuf==3.7.1
python3 -m pip install --upgrade pip
pip install protobuf==3.20

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"computeBenchmarkIndex": "./core/scripts/benchmark.js",
"minify-latest-run": "./core/scripts/lantern/minify-trace.js ./latest-run/defaultPass.trace.json ./latest-run/defaultPass.trace.min.json && ./core/scripts/lantern/minify-devtoolslog.js ./latest-run/defaultPass.devtoolslog.json ./latest-run/defaultPass.devtoolslog.min.json",
"save-latest-run": "./core/scripts/save-latest-run.sh",
"compile-proto": "protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo \"❌ Install protobuf 3.7.1 to compile the proto file.\" && false)",
"build-proto-roundtrip": "mkdir -p .tmp && cross-env PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 python proto/scripts/json_roundtrip_via_proto.py",
"compile-proto": "protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo \"❌ Install protobuf = 3.20.x to compile the proto file.\" && false)",
"build-proto-roundtrip": "mkdir -p .tmp && python3 proto/scripts/json_roundtrip_via_proto.py",
"static-server": "node cli/test/fixtures/static-server.js",
"serve-dist": "cd dist && python3 -m http.server 7878",
"serve-gh-pages": "cd dist/gh-pages && python3 -m http.server 7333",
Expand Down