Visitar URL original
feat: add include package selection 路 changesets/changesets@1c4d4eb 路 GitHub
Skip to content

Add include configuration and version flag #2670

Add include configuration and version flag

Add include configuration and version flag #2670

Workflow file for this run

name: CI
on:
pull_request:
# merge queue is required so all commits on target branches trigger this workflow
# despite lack of the push event trigger here
merge_group:
branches:
- main
- next
# merge group rulesets don't allow wildcards so in settings each maintenance branch needs to be added separately
- "maintenance/v*" # branch rulesets don't support v[0-9]+
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: $/.github/actions/ci-setup
- name: Build artifacts
run: pnpm build
- name: Upload artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
# the size of the dist artifacts is not very large, so we can use better compression without a slowdown
compression-level: 8
# store it for as short as possible, since we only need it for the same workflow run
retention-days: 1
name: dist
path: |
packages/*/dist
scripts/*/dist
lint-workflows:
name: Lint workflows
runs-on: ubuntu-latest
permissions:
actions: read # only required in private repos
security-events: write # allow writing security events
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
with:
persona: pedantic
annotations: true
advanced-security: false
test:
name: "Test using Node ${{ matrix.node_version }} on ${{ matrix.os }}"
needs: [build]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
node_version: [22, 24, 26]
os: [ubuntu-latest]
include:
# Active LTS + other OS
- node_version: 24
os: macos-latest
- node_version: 24
os: windows-latest
fail-fast: false
steps:
- uses: $/.github/actions/ci-setup
with:
node-version: ${{ matrix.node_version }}
download-dist: true
- name: Check Git version
run: git --version
- name: Setup mock Git user
run: git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- name: Vitest tests
if: matrix.os != 'windows-latest' && !(matrix.node_version == 24 && matrix.os == 'ubuntu-latest')
run: pnpm test
# For Windows, run fixtures in the runner tempdir instead of os tempdir. The default tempdir
# is in the D drive which is known to be slow: https://github.com/actions/runner-images/issues/8755
- name: Vitest tests on Windows
if: matrix.os == 'windows-latest'
run: pnpm test
env:
TEMP: ${{ runner.temp }}
TMP: ${{ runner.temp }}
# Run coverage only once on Ubuntu & node 24 to avoid duplicate codecov uploads
- name: Vitest tests with coverage
if: matrix.node_version == 24 && matrix.os == 'ubuntu-latest'
run: pnpm test --coverage
- name: Upload coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
if: matrix.node_version == 24 && matrix.os == 'ubuntu-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
e2e:
name: E2E tests
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: $/.github/actions/ci-setup
with:
node-version: 24
download-dist: true
install-e2e: true
- name: Typecheck E2E tests
run: pnpm --filter=@changesets/e2e types:check
- name: Run E2E tests
run: pnpm test:e2e
typecheck:
name: Typecheck
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: $/.github/actions/ci-setup
with:
download-dist: true
- name: Typecheck
run: pnpm types:check
lint:
name: Lint
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: $/.github/actions/ci-setup
with:
download-dist: true
- name: Lint
run: pnpm lint
- name: Format
run: pnpm format
ci-ok:
name: CI OK
runs-on: ubuntu-latest
if: always()
needs: [lint-workflows, build, test, e2e, typecheck, lint]
steps:
- name: Exit with error if some jobs are not successful
run: exit 1
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}