Skip to content

chore: Remove unnecessary internals #216

chore: Remove unnecessary internals

chore: Remove unnecessary internals #216

Workflow file for this run

name: CI/CD
on:
push:
pull_request:
types: [opened, reopened]
env:
FORCE_COLOR: 3 # Diplay chalk colors
jobs:
ci:
# Watch out! When changing the job name,
# update the required checks in GitHub
# branch protection settings for `next`.
name: CI (${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.window-history-support && ' WHS' || ''}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Watch out! When changing the compat grid,
# update the required checks in GitHub
# branch protection settings for `next`.
base-path: [false, '/base']
window-history-support: [false]
next-version:
- '13.4'
- '13.5'
- '14.0.1'
# 14.0.2 is not compatible due to a prefetch issue
- latest
include:
- next-version: latest
window-history-support: true
- next-version: latest
window-history-support: true
base-path: '/base'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598
with:
version: 8
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Install Next.js version ${{ matrix.next-version }}
run: pnpm add --filter e2e next@${{ matrix.next-version }}
- name: Run integration tests
run: pnpm run test
env:
BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }}
WINDOW_HISTORY_SUPPORT: ${{ matrix.window-history-support }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: failure()
with:
path: packages/e2e/cypress/screenshots
name: ci-${{ matrix.next-version }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.window-history-support && '-whs' || ''}}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
with:
status: ${{ job.status }}
jobName: next@${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.window-history-support && ' WHS' || ''}}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
cd:
name: Deployment
runs-on: ubuntu-latest
needs: [ci]
if: ${{ github.ref_name == 'master' || github.ref_name == 'beta' }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598
with:
version: 8
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version: lts/*
cache: pnpm
# Note: we do not use an external Turbo cache for publishing
# to prevent against possible cache collision attacks.
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Build package
run: pnpm build --filter next-usequerystate
- name: Semantic Release
run: ../../node_modules/.bin/semantic-release
working-directory: packages/next-usequerystate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}