diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85ff2fb..5119ef3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,20 @@ jobs: with: node-version: 20 pnpm-version: 8 + - run: echo "PUPPETEER_VERSION=$(pnpm ls puppeteer --json | jq '.[0].devDependencies.puppeteer.version' -r)" >> $GITHUB_ENV + shell: bash + - uses: actions/cache@v4 + with: + path: ~/.cache/puppeteer/chrome + key: ${{ runner.os }}-puppeteer-chromium-${{ env.PUPPETEER_VERSION }} + restore-keys: ${{ runner.os }}-puppeteer-chromium- + - name: install chromium + run: | + # very bad, but I do not found any other way to run + # a postinstall script of an already installed package + pnpm -C node_modules/puppeteer run postinstall + env: + PUPPETEER_DOWNLOAD_BASE_URL: https://storage.googleapis.com/chrome-for-testing-public - name: 🧪 Run the tests run: pnpm run test