Skip to content

Lighthouse 9 + use Docker runner instead of Node runner

Choose a tag to compare

@adamhenson adamhenson released this 28 Nov 02:12
· 36 commits to master since this release

Summary

Bumps @foo-software/lighthouse-check to version 5 and effectively Lighthouse 9. Because Lighthouse 9 enforces a minimum of Node 14 and GitHub still has not published a Node 14 GitHub Action runner we use a Docker runner instead of Node. This also remedies the issue of needing to keep the dist and node_modules directories versioned in this project.

Breaking Changes

Because this GitHub Action now runs within a Docker containerized environment vs directly in the GitHub Action runner via Node, when persisting artifacts for example, such as reports the following change would be required.

name: Lighthouse Check
on: [pull_request]

jobs:
  lighthouse:
    # ...
    steps:
      # ...
-      - run: mkdir -p /tmp/artifacts
+      - run: mkdir -p ${{ github.workspace }}/tmp/artifacts
      - name: Run Lighthouse
        uses: ./
        with:
          # ...
-          outputDirectory: tmp/artifacts
+          outputDirectory: ${{ github.workspace }}/tmp/artifacts
      - name: Upload artifacts
        uses: actions/upload-artifact@master
        with:
          name: Lighthouse reports
-          path: /tmp/artifacts
+          path: ${{ github.workspace }}/tmp/artifacts

Note we use github.workspace because env.GITHUB_WORKSPACE appears to be broken in that it returns empty.

See #67 for detailed examples.

Upstream Changes