FleekHQ / action-deploy

Github Action to deploy code to a Fleek Site
8 stars 10 forks source link

Running CI Tests against deployment preview #3

Open ivelin opened 2 years ago

ivelin commented 2 years ago

Happy New Year, Fleek team!

I am helping OlympusDAO front end dev and have a question related to CI deployment previews.

We can see the preview deployment URL in the PR check, but not sure how to use it as a trigger and parameter to a github action.

2021-12-29T03:06:56.956Z: You can preview this build on :
2021-12-29T03:06:56.956Z: https://bafybeiduhbnqvujhupyxroqy76riecovmyytcf76lx7naup2i7gkop4lna.on.fleek.co

Is there a way to run Lighthouse or E2E tests against a site deployment preview? Something similar to this Netlify deployment preview action:

  lighthouse:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Wait for Netlify preview deployment of this git branch
      if: github.repository_owner == 'ambianic'
      uses: jakepartusch/wait-for-netlify-action@v1
      id: get-netlify-url
      with:
        site_name: "ambianic-pwa-dist"
        max_timeout: 180
    - name: Run Lighthouse PWA check against Netlify PR Preview
      uses: treosh/lighthouse-ci-action@v8
      with:
        urls: |
          ${{ steps.get-netlify-url.outputs.url }}
        uploadArtifacts: true # save results as an action artifacts
        temporaryPublicStorage: true # upload lighthouse report to the temporary storage
        # budgetPath: '.github/lighthouse/budget.json' # performance budgets
        configPath: '.github/lighthouse/lighthouserc-netlify-preview.json' # PWA checks
ivelin commented 2 years ago

This is the goal. Netlfiy and Vercel provide this ability. Is it on the Fleek.co roadmap? https://www.brianperry.dev/til/2021/configuring-lighthouse-ci-with-github-actions/ https://dev.to/oskarahl/automated-lighthouse-score-on-your-pr-with-vercel-and-github-actions-2ng2