Skip to content

fix: set useDefineForClassFields to false in tsup swc config #254

fix: set useDefineForClassFields to false in tsup swc config

fix: set useDefineForClassFields to false in tsup swc config #254

Workflow file for this run

name: Build and Test
on:
push:
branches:
- 'ci_test'
pull_request:
branches:
- '*'
jobs:
changeset:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate changeset
run: |
HAS_CHANGELOG=$(git diff ${{ github.event.pull_request.base.sha }} --name-only | grep -c "CHANGELOG.md" || true)
if [ "$HAS_CHANGELOG" -gt "0" ]; then
if ls .changeset/*.md 2>/dev/null | grep -qv "README.md"; then
echo "Uncommitted changeset files found. Run 'pnpm changeset version' first."
exit 1
fi
elif [ "${{ contains(github.event.pull_request.labels.*.name, 'skip-changeset') }}" != "true" ]; then
echo "No CHANGELOG.md changes found. Either run 'pnpm changeset version' or add 'skip-changeset' label to this PR."
exit 1
fi
ci:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
defaults:
run:
working-directory: ./
strategy:
matrix:
node-version:
- 20
- 22
- 24
rabbitmq-version:
- '3.11'
- '3.13'
mongodb-version:
- '7'
- '8'
services:
rabbitmq:
image: rabbitmq:${{ matrix.rabbitmq-version }}
env:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin_password
ports:
- 5672/tcp
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
mongodb:
image: mongo:${{ matrix.mongodb-version }}
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin_password
MONGO_INITDB_DATABASE: test
options: >-
--health-cmd "mongosh --quiet -u admin -p admin_password --authenticationDatabase admin --eval 'db.runCommand({ ping: 1 }).ok' | grep 1"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 27017/tcp
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm -r --filter=!./docs build
- name: Test
env:
RABBITMQ_URL: amqp://admin:admin_password@localhost:${{ job.services.rabbitmq.ports[5672] }}
MONGODB_URL: mongodb://admin:admin_password@localhost:${{ job.services.mongodb.ports[27017] }}/admin
run: pnpm -r --filter=!./docs test
- name: Upload coverage to Codecov
if: ${{ github.ref == 'refs/heads/main' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}