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

feat(plugin-lighthouse): add lighthouse runner #549

Merged
merged 151 commits into from
Apr 3, 2024
Merged

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Mar 8, 2024

This PR wraps lighthouse core functionality exported as ESM with a PluginRunner for the @code-pushup/lighthouse-plugin package.

It aims to leverage all functionality directly over reusing their ESM exports instead of using the CLI.
This is less code to maintain as well as faster to execute and more scalable in terms of process arguments.

Changes included in this PR:

  • plugin options mirroring runLighthouse, the core functionality of lighthouse. The following arguments are defined: url, flags and config.
  • a getRunner is implemented to get a lighthouse runner receiving the url, flags and config arguments
    • Parts of the functionality of lighthouse CLI are excluded: all commands that don't produce a report, latern data logic.
      The user is informed about missing implementations if by accident provided over the CLI flags or config object
  • additional helper to generate and validate the used flags and config object
  • added CONTRIBUTING.md to document setup and debugging of Lighthouse
  • setup CI for Lighthouse path configuration on windows

Follow up PR:

Note

There is one thing left, I want to have the env variable only set for Windows in the CI.

References:

related to #90

@BioPhoton BioPhoton changed the title Add lighthouse runner feat(plugin-lighthouse): add lighthouse runner Mar 8, 2024
# Conflicts:
#	packages/plugin-lighthouse/src/lib/utils.unit.test.ts
@github-actions github-actions bot added the 📖 Project documentation improvements or additions to the project documentation label Mar 8, 2024
@BioPhoton BioPhoton self-assigned this Mar 8, 2024
@github-actions github-actions bot added the 🦾 CI/CD continuous integration and deployment label Mar 9, 2024
matejchalk
matejchalk previously approved these changes Apr 2, 2024
.github/workflows/ci.yml Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/plugin-lighthouse/CONTRIBUTING.md Show resolved Hide resolved
packages/plugin-lighthouse/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/plugin-lighthouse/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/plugin-lighthouse/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/plugin-lighthouse/CONTRIBUTING.md Show resolved Hide resolved
@BioPhoton BioPhoton requested a review from Tlacenka April 2, 2024 10:47
BioPhoton and others added 2 commits April 2, 2024 17:59
Co-authored-by: Katka Pilátová <[email protected]>
Co-authored-by: Katka Pilátová <[email protected]>
Tlacenka
Tlacenka previously approved these changes Apr 2, 2024
Tlacenka
Tlacenka previously approved these changes Apr 2, 2024
@BioPhoton BioPhoton merged commit 9098d49 into main Apr 3, 2024
19 checks passed
@BioPhoton BioPhoton deleted the add-lighthouse-runner branch April 3, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦾 CI/CD continuous integration and deployment 🧩 lighthouse-plugin 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling 🧩 utils
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants