chore(deps): Bump joi from 18.2.1 to 18.2.8 in /examples/next/block-support #2024
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
| name: E2E Test Packages | |
| on: | |
| pull_request: | |
| paths: | |
| - 'examples/next/**' | |
| jobs: | |
| e2e-test-faustwp-getting-started-example: | |
| name: (faustwp) Next Getting Started Example on Node ${{ matrix.node }} | |
| runs-on: ubuntu-22.04 | |
| env: | |
| PR_REPO: ${{github.event.pull_request.head.repo.full_name}} | |
| PR_BRANCH: ${{github.event.pull_request.head.ref}} | |
| strategy: | |
| matrix: | |
| node: ['20', '22', '24'] | |
| defaults: | |
| run: | |
| working-directory: ./ | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - name: setup node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # Get the PR branch so we can pull the correct Next.js example path | |
| - name: echo current pr branch name | |
| run: | | |
| echo $PR_BRANCH | |
| # Get the PR repo so we can pull the correct Next.js example path | |
| - name: echo current pr repo | |
| run: | | |
| echo $PR_REPO | |
| # Install the Faust.js Next getting started example via npx create next app | |
| # and use the PR branch to pull the correct example URL | |
| - name: npx create next app | |
| run: | | |
| npx create-next-app@13 \ | |
| -e https://github.com/${PR_REPO}/tree/${PR_BRANCH} \ | |
| --example-path examples/next/faustwp-getting-started \ | |
| --use-npm \ | |
| e2e-app | |
| - name: install and build packages | |
| working-directory: ./ | |
| run: | | |
| npm ci | |
| npm run build | |
| # To ensure PR changes are tested accurately, we replace the | |
| # faust node_modules downloaded from NPM with the faust packages | |
| # built in the previous step | |
| # TODO: It would be nice to use symlink or npm link here, but upon | |
| # writing this they do not function as expected on GH actions | |
| - name: replace downloaded registry faust packages with local build | |
| run: | | |
| mkdir -p e2e-app/node_modules/@faustwp | |
| rm -rf e2e-app/node_modules/@faustwp/cli | |
| rm -rf e2e-app/node_modules/@faustwp/core | |
| cp -r packages/faustwp-cli e2e-app/node_modules/@faustwp/cli | |
| cp -r packages/faustwp-core e2e-app/node_modules/@faustwp/core | |
| mkdir -p e2e-app/node_modules/.bin | |
| ln -sf ../@faustwp/cli/dist/index.js e2e-app/node_modules/.bin/faust | |
| chmod +x e2e-app/node_modules/@faustwp/cli/dist/index.js | |
| # create-next-app's npm install may fail if @faustwp/* versions | |
| # are not yet published. Point deps at local builds so npm install | |
| # can resolve them and install all remaining dependencies. | |
| # --install-links copies packages instead of symlinking, avoiding | |
| # duplicate React instances from split module resolution. | |
| - name: install e2e-app dependencies | |
| working-directory: e2e-app | |
| run: | | |
| npm pkg set "dependencies.@faustwp/cli=file:../packages/faustwp-cli" | |
| npm pkg set "dependencies.@faustwp/core=file:../packages/faustwp-core" | |
| npm install --install-links | |
| - name: copy env | |
| working-directory: e2e-app | |
| run: | | |
| cp .env.local.sample .env.local | |
| # Generate the schema to ensure no type collisions | |
| - name: Generate Schema | |
| working-directory: e2e-app | |
| run: | | |
| npm run generate | |
| - name: Build | |
| working-directory: e2e-app | |
| run: | | |
| npm run build |