Skip to content

feat: Chokidar use polling on rollup watch #1106

feat: Chokidar use polling on rollup watch

feat: Chokidar use polling on rollup watch #1106

Workflow file for this run

name: CI & Release
on:
push:
branches:
- alpha
- beta
- next
- main
pull_request:
branches:
- alpha
- beta
- next
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # for checkout
jobs:
build:
runs-on: ubuntu-latest
name: Lint & Build
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version: lts/*
- run: corepack enable && pnpm --version
- run: pnpm install
- run: pnpm lint
- run: pnpm build
- uses: actions/upload-artifact@v3
name: Cache build output
with:
name: build-output
path: |
bin/
dist/
playground:
needs: build
runs-on: ubuntu-latest
name: Playground builds
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version: lts/*
- run: corepack enable && pnpm --version
- run: pnpm install
- uses: actions/download-artifact@v3
name: Restore build output
with:
name: build-output
- run: pnpm playground:build
env:
NODE_OPTIONS: --max_old_space_size=8192
- name: Archive build outputs of runtime tests
uses: actions/upload-artifact@v3
with:
name: runtime-dist
path: |
playground/runtime-*/dist
playground/runtime-*/.next
!playground/runtime-*/.next/cache
test:
needs: build
runs-on: ${{ matrix.platform }}
name: Node.js ${{ matrix.node-version }} / ${{ matrix.platform }}
strategy:
# A test failing on windows doesn't mean it'll fail on macos. It's useful to let all tests run to its completion to get the full picture
fail-fast: false
matrix:
# Run the testing suite on each major OS with the latest LTS release of Node.js
platform: [macos-latest, ubuntu-latest, windows-latest]
node-version: [lts/*]
# It makes sense to also test latest version of Node.js, on ubuntu-only since it's the fastest CI runner
# @TODO re-enable after the nightly is stable
# include:
# - platform: ubuntu-latest
# Test the actively developed version that will become the latest LTS release next October
# node-version: current
steps:
- name: Set git to use LF
if: matrix.platform == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ matrix.node-version }}
- run: corepack enable && pnpm --version
- run: pnpm install
- uses: actions/download-artifact@v3
name: Restore build output
with:
name: build-output
- run: pnpm test
release:
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
name: "Semantic release"
needs: [test, playground]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Need to fetch entire commit history to
# analyze every commit since last release
fetch-depth: 0
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version: lts/*
- run: corepack enable && pnpm --version
- run: pnpm install
# Branches that will release new versions are defined in .releaserc.json
- run: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}