Shopify / lighthouse-ci-action

MIT License
100 stars 50 forks source link

Update base Dockerimage ruby to 3.1.4 for the latest Shopify CLI #72

Closed raymondsquared closed 9 months ago

raymondsquared commented 12 months ago

In order to support the latest Shopify CLI version we need to update the global ruby version to 3.1.4

When I run it with the existing base Dockerimage - ruby version 2.7.1, I was getting the following error:

Your environment Ruby version, 2.7.1, is outside of the range supported by the CLI, 2.7.5..<3.2.0, and might cause incompatibility issues.

Not only that this PR solves running this lighthouse-ci-action with latest Shopify CLI v2.x, it might also be a solid foundation work the following GitHub Issue: https://github.com/Shopify/lighthouse-ci-action/issues/51

This Ruby version 3.1.4 will support both v2(Ruby based) and v3(JS based) Shopify CLI.

Shopify CLI v2.x REF: https://github.com/Shopify/shopify-cli/blob/main/lib/shopify_cli/constants.rb#L68-L69

Shopify CLI v3.x REF: https://github.com/Shopify/cli/blob/main/packages/cli-kit/assets/cli-ruby/lib/shopify_cli/constants.rb#L71-L72

REF:

Screenshot 2023-10-23 at 8 53 15 pm
rbarreca commented 9 months ago

Any reason this hasn't been merged yet? Getting this error too.

7 [2/4] RUN gem uninstall shopify-cli

7 0.449 Successfully uninstalled shopify-cli-2.0.1

7 DONE 0.5s

8 [3/4] RUN gem install shopify-cli -N -n /usr/local/bin

8 25.05 ERROR: Error installing shopify-cli:

8 25.05 The last version of nokogiri (>= 1.12) to support your Ruby & RubyGems was 1.15.5. Try installing it with gem install nokogiri -v 1.15.5 and then running the current command again

8 25.05 nokogiri requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.7.1.83.

8 25.07 Successfully installed ast-2.4.2

8 25.07 Successfully installed parser-3.2.2.4

rbarreca commented 9 months ago

@raymondsquared any ideas why I'm getting that same error even when using your fork?

jobs:
  lhci:
    name: Lighthouse
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Lighthouse
        uses: raymondsquared/lighthouse-ci-action@support-cli-3x # shopify/lighthouse-ci-action@v1.1.1
        with:
          store: ${{ secrets.SHOP_STORE_OS2 }}
          password: ${{ secrets.SHOP_PASSWORD_OS2 }}
          access_token: ${{ secrets.SHOP_ACCESS_TOKEN }}
          collection_handle: all
          lhci_github_app_token: ${{ secrets.LHCI_GITHUB_TOKEN }}
          pull_theme: ${{ secrets.SHOP_PULL_THEME }}
octipus commented 9 months ago

Running in a similar issue, i think they are related but i'm getting a different error. @rbarreca i can confirm i'm getting the same error when running @raymondsquared fork

Screenshot 2024-01-03 at 12 04 41

rbarreca commented 9 months ago

I'm confused how it is working for Shopify/dawn even. I'm using the same yaml file as them.

kmishal commented 9 months ago

I'm confused how it is working for Shopify/dawn even. I'm using the same yaml file as them.

@rbarreca Its not working for shopify/dawn as well. Check there latest CI action https://github.com/Shopify/dawn/actions/workflows/ci.yml

charlespwd commented 9 months ago

Fixed by 1.2.X