build(deps): bump the npm_and_yarn group across 3 directories with 2 updates #788
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- staging | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
jobs: | |
install: | |
name: Install deps | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
lint: | |
name: Run Lint | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm run build | |
- name: Run linter | |
run: pnpm run lint | |
type-check: | |
name: Run Type Checker | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm run build | |
- name: Run TSC | |
run: pnpm run type-check | |
unit-test: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
needs: [install] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm run build | |
- name: Run unit tests | |
run: pnpm run test:unit:ci | |
- name: Upload coverage reports to codecov | |
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN }} | |
url: ${{ secrets.CODECOV_URL }} | |
- name: Upload coverage reports to codecov (Staging) | |
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
url: ${{ secrets.CODECOV_STAGING_URL }} | |
- name: Upload test result reports to codecov | |
if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN }} | |
url: ${{ secrets.CODECOV_URL }} | |
- name: Upload test result reports to codecov (Staging) | |
if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
url: ${{ secrets.CODECOV_STAGING_URL }} | |
integration-test: | |
name: Run integration tests (Node ${{ matrix.node-version }}) | |
needs: install | |
runs-on: ubuntu-latest | |
services: | |
test-api: | |
image: codecov/codecov-javascript-bundler-plugins-test-api | |
ports: | |
- 8000:8000 | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: ["18.x", "20.x"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm run build | |
- name: Run e2e tests | |
run: pnpm run test:e2e | |
upload-example-stats-production: | |
name: "Production: upload ${{ matrix.example }} stats" | |
runs-on: ubuntu-latest | |
needs: [install, unit-test, integration-test] | |
strategy: | |
fail-fast: false | |
matrix: | |
example: | |
[ | |
"bundle-analyzer-cli", | |
"bundle-analyzer-lib-cjs", | |
"bundle-analyzer-lib-esm", | |
"next-js", | |
"next-js-15", | |
"nuxt", | |
"oidc", | |
"remix", | |
"rollup", | |
"sveltekit", | |
"vite", | |
"webpack", | |
"solidstart", | |
"tokenless", | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build plugins | |
run: pnpm run build | |
- name: Install built plugins | |
run: pnpm install | |
- name: Build ${{ matrix.example }} app for production | |
working-directory: ./examples/${{ matrix.example }} | |
env: | |
HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
BUNDLE_ANALYZER_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
BUNDLE_ANALYZER_API_URL: ${{ secrets.CODECOV_API_URL }} | |
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
NEXT_API_URL: ${{ secrets.CODECOV_API_URL }} | |
NUXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
NUXT_API_URL: ${{ secrets.CODECOV_API_URL }} | |
OIDC_API_URL: ${{ secrets.CODECOV_API_URL }} | |
REMIX_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
REMIX_API_URL: ${{ secrets.CODECOV_API_URL }} | |
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
ROLLUP_API_URL: ${{ secrets.CODECOV_API_URL }} | |
SOLIDSTART_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
SOLIDSTART_API_URL: ${{ secrets.CODECOV_API_URL }} | |
SVELTEKIT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
SVELTEKIT_API_URL: ${{ secrets.CODECOV_API_URL }} | |
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
VITE_API_URL: ${{ secrets.CODECOV_API_URL }} | |
TOKENLESS_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
TOKENLESS_API_URL: ${{ secrets.CODECOV_API_URL }} | |
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
WEBPACK_API_URL: ${{ secrets.CODECOV_API_URL }} | |
run: pnpm run build | |
upload-example-stats-staging: | |
name: "Staging: upload ${{ matrix.example }} stats" | |
runs-on: ubuntu-latest | |
needs: [install, unit-test, integration-test] | |
strategy: | |
fail-fast: false | |
matrix: | |
example: | |
[ | |
"bundle-analyzer-cli", | |
"bundle-analyzer-lib-cjs", | |
"bundle-analyzer-lib-esm", | |
"next-js", | |
"next-js-15", | |
"nuxt", | |
"oidc", | |
"remix", | |
"rollup", | |
"sveltekit", | |
"vite", | |
"webpack", | |
"solidstart", | |
"tokenless", | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build plugins | |
run: pnpm run build | |
- name: Install built plugins | |
run: pnpm install | |
- name: Build ${{ matrix.example }} app for staging | |
working-directory: ./examples/${{ matrix.example }} | |
env: | |
HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
BUNDLE_ANALYZER_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
BUNDLE_ANALYZER_API_URL: ${{ secrets.CODECOV_API_URL }} | |
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
NEXT_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} | |
NUXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
NUXT_API_URL: ${{ secrets.CODECOV_API_URL }} | |
OIDC_API_URL: ${{ secrets.CODECOV_API_URL }} | |
REMIX_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
REMIX_API_URL: ${{ secrets.CODECOV_API_URL }} | |
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
ROLLUP_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} | |
SOLIDSTART_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
SOLIDSTART_API_URL: ${{ secrets.CODECOV_API_URL }} | |
SVELTEKIT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
SVELTEKIT_API_URL: ${{ secrets.CODECOV_API_URL }} | |
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
VITE_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} | |
TOKENLESS_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
TOKENLESS_API_URL: ${{ secrets.CODECOV_API_URL }} | |
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
WEBPACK_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} | |
run: pnpm run build | |
upldate-plugin-stats-production: | |
name: "Production: upload ${{ matrix.package }} stats" | |
runs-on: ubuntu-latest | |
needs: [install, unit-test, integration-test] | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
[ | |
"bundle-analyzer", | |
"bundler-plugin-core", | |
"nextjs-webpack-plugin", | |
"nuxt-plugin", | |
"remix-vite-plugin", | |
"rollup-plugin", | |
"sveltekit-plugin", | |
"vite-plugin", | |
"webpack-plugin", | |
"solidstart-plugin", | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build plugins | |
run: pnpm run build | |
- name: Install plugins | |
run: pnpm install | |
- name: Build ${{ matrix.package }} to collect stats for production | |
working-directory: ./packages/${{ matrix.package }} | |
env: | |
PLUGIN_CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
PLUGIN_CODECOV_API_URL: ${{ secrets.CODECOV_API_URL }} | |
run: pnpm run build | |
upldate-plugin-stats-staging: | |
name: "Staging: upload ${{ matrix.package }} stats" | |
runs-on: ubuntu-latest | |
needs: [install, unit-test, integration-test] | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
[ | |
"bundle-analyzer", | |
"bundler-plugin-core", | |
"nextjs-webpack-plugin", | |
"nuxt-plugin", | |
"remix-vite-plugin", | |
"rollup-plugin", | |
"sveltekit-plugin", | |
"vite-plugin", | |
"webpack-plugin", | |
"solidstart-plugin", | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-codecov-js-bundle-plugin-node-modules | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build plugins | |
run: pnpm run build | |
- name: Install plugins | |
run: pnpm install | |
- name: Build ${{ matrix.package }} to collect stats for staging | |
working-directory: ./packages/${{ matrix.package }} | |
env: | |
PLUGIN_CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }} | |
PLUGIN_CODECOV_API_URL: ${{ secrets.CODECOV_STAGING_API_URL }} | |
run: pnpm run build |