Restore original Carbon ad display #513
Workflow file for this run
This file contains hidden or 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
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: CI | |
| on: | |
| push: | |
| branches: [bundlephobia] | |
| pull_request: | |
| branches: [bundlephobia] | |
| jobs: | |
| build: | |
| name: build (${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [26.x] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| package-manager-cache: false | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Get Yarn cache directory | |
| id: yarn-cache | |
| run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | |
| - name: Cache Yarn packages | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.yarn-cache.outputs.dir }} | |
| key: yarn-${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }} | |
| - name: Install project dependencies | |
| run: yarn install --immutable | |
| - name: Cache Next.js build | |
| uses: actions/cache@v6 | |
| with: | |
| path: .next/cache | |
| key: nextjs-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| nextjs-${{ runner.os }}-${{ hashFiles('yarn.lock') }}- | |
| - name: Run lint | |
| run: yarn lint | |
| - name: Test package recommendation automation | |
| run: yarn test:recommendations | |
| - name: Type check | |
| run: yarn typecheck | |
| - run: yarn build | |
| env: | |
| CI: true | |
| integration: | |
| name: integration (${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [26.x] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| package-manager-cache: false | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Get Yarn cache directory | |
| id: yarn-cache | |
| run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | |
| - name: Cache Yarn packages | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.yarn-cache.outputs.dir }} | |
| key: yarn-${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }} | |
| - name: Install project dependencies | |
| run: yarn install --immutable | |
| - name: Cache Next.js build | |
| uses: actions/cache@v6 | |
| with: | |
| path: .next/cache | |
| key: nextjs-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| nextjs-${{ runner.os }}-${{ hashFiles('yarn.lock') }}- | |
| - name: Build application for integration tests | |
| run: yarn build | |
| env: | |
| CI: true | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| playwright-${{ runner.os }}- | |
| - name: Install Playwright Chromium | |
| run: yarn playwright install --with-deps chromium | |
| - name: Run end-to-end tests | |
| run: yarn test:e2e:run | |
| env: | |
| CI: true | |
| - name: Upload Playwright report | |
| if: ${{ !cancelled() && hashFiles('playwright-report/**') != '' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 14 | |
| jvm-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Use JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v6 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Build JVM package workspace | |
| working-directory: jvm-package-build-stats | |
| run: ./gradlew build --no-daemon | |
| - name: Verify Maven publication layout | |
| working-directory: jvm-package-build-stats | |
| run: | | |
| ./gradlew :core:publishMavenPublicationToReleaseTestRepository :cli:publishMavenPublicationToReleaseTestRepository --no-daemon | |
| CORE_JAR=$(find build/release-test-repository/com/bundlephobia/jvm-package-build-stats-core/0.1.0-SNAPSHOT -name '*.jar' ! -name '*-sources.jar' ! -name '*-javadoc.jar' | head -1) | |
| CLI_JAR=$(find build/release-test-repository/com/bundlephobia/jvm-package-build-stats-cli/0.1.0-SNAPSHOT -name '*.jar' ! -name '*-sources.jar' ! -name '*-javadoc.jar' | head -1) | |
| CORE_POM=$(find build/release-test-repository/com/bundlephobia/jvm-package-build-stats-core/0.1.0-SNAPSHOT -name '*.pom' | head -1) | |
| test -n "$CORE_JAR" && test -n "$CLI_JAR" && test -n "$CORE_POM" | |
| jar tf "$CORE_JAR" | grep -q 'com/bundlephobia/jvm/PackageBuildStatsAnalyzer.class' | |
| jar tf "$CORE_JAR" | grep -q 'org/objectweb/asm/ClassReader.class' | |
| jar tf "$CLI_JAR" | grep -q 'com/bundlephobia/jvm/cli/MainKt.class' | |
| java -jar "$CLI_JAR" --help | grep -q 'Analyze published JVM package size' | |
| ! grep -q '<dependencies>' "$CORE_POM" |