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

misc(build): report to buildtracker on commit via ghactions #10550

Merged
merged 16 commits into from
Apr 14, 2020
33 changes: 33 additions & 0 deletions .github/workflows/buildtracker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Workflow that only runs when a commit lands on master.

name: 👷‍♀️

on:
push:
branches:
- master
pull_request:

jobs:
buildtracker:

runs-on: ubuntu-latest

steps:
- name: git clone
uses: actions/checkout@v2

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

- run: yarn --frozen-lockfile
- run: yarn build-all

- name: Store in buildtracker
Copy link
Collaborator

Choose a reason for hiding this comment

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

wdyt of just adding this to the basic workflow? You need to install node, run yarn and build for this to work, so it's already a heavy workflow.

#10549 reused basic.yml for the same reason.

Copy link
Member Author

Choose a reason for hiding this comment

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

good call.

Copy link
Member

Choose a reason for hiding this comment

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

You need to install node, run yarn and build for this to work, so it's already a heavy workflow

why is installing node 10 so heavy? I don't understand how e.g. in https://github.com/GoogleChrome/lighthouse/pull/10549/checks?check_run_id=565300864 protoc, python, and pip run in like 3% of the time node setup does. Obviously protoc is pre-compiled, but what's the lazy node action doing in there?

If it stays at 2.5 minutes I foresee all actions going in this file :)

Copy link
Member Author

Choose a reason for hiding this comment

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

why is installing node 10 so heavy?

dont know.. i see it taking a while today but in previous master commits, that step takes <3s.

run: yarn bt-cli upload-build
env:
# https://buildtracker.dev/docs/guides/github-actions#configuration
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think GITHUB_TOKEN is already a set env variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

good call.

BT_API_AUTH_TOKEN: ${{ secrets.BT_API_AUTH_TOKEN }}
16 changes: 16 additions & 0 deletions build-tracker.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// https://buildtracker.dev/docs/installation/#upload-your-builds

'use strict';

module.exports = {
applicationUrl: 'https://lh-build-tracker.herokuapp.com',
artifacts: [
'dist/lightrider/lighthouse-lr-bundle.js',
'dist/extension/scripts/lighthouse-ext-bundle.js',
'dist/lighthouse-dt-bundle.js',
'dist/viewer/src/viewer.js',
'dist/lightrider/report-generator-bundle.js',
'dist/dt-report-resources/report.js',
'dist/dt-report-resources/report-generator.js',
],
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"static-server": "node lighthouse-cli/test/fixtures/static-server.js"
},
"devDependencies": {
"@build-tracker/cli": "^1.0.0-beta.14",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch. i actually asked him to publish that one. :)
it fixed the slow responsiveness of the hoverline on https://lh-build-tracker.herokuapp.com/

"@firebase/app-types": "0.3.1",
"@firebase/auth-types": "0.3.2",
"@firebase/util": "0.2.1",
Expand Down
Loading