chore: bump version to 0.2.3 and update changelog #16
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: Test | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Check Node.js version | |
| run: | | |
| echo "Node.js version: $(node --version)" | |
| echo "npm version: $(npm --version)" | |
| echo "Node.js major version: $(node --version | cut -d. -f1 | tr -d v)" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Clean and build project | |
| run: | | |
| # Clean any existing build artifacts | |
| rm -rf dist/ | |
| # Build the project | |
| npm run build | |
| # Verify build artifacts exist | |
| ls -la dist/ | |
| - name: Run tests | |
| run: | | |
| # Run tests with retry mechanism for better stability | |
| for i in {1..3}; do | |
| echo "Test attempt $i/3" | |
| if npm test; then | |
| echo "Tests passed on attempt $i" | |
| break | |
| elif [ $i -eq 3 ]; then | |
| echo "Tests failed after 3 attempts" | |
| exit 1 | |
| else | |
| echo "Test attempt $i failed, retrying..." | |
| sleep 5 | |
| fi | |
| done | |
| env: | |
| # Set longer timeout for tests | |
| VITEST_TIMEOUT: 60000 | |
| # Uncomment the next line to skip hook tests | |
| SKIP_HOOK_TESTS: true | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Check formatting | |
| run: npx prettier --check src/ test/ | |
| - name: Test development mode compatibility | |
| run: | | |
| NODE_VERSION=$(node --version | cut -d. -f1 | tr -d v) | |
| echo "Testing development mode for Node.js $NODE_VERSION" | |
| if [ "$NODE_VERSION" -eq 22 ]; then | |
| echo "Testing with npm run dev" | |
| npm run dev -- --version | |
| elif [ "$NODE_VERSION" -eq 20 ]; then | |
| echo "Testing with npm run dev:node20" | |
| npm run dev:node20 -- --version | |
| elif [ "$NODE_VERSION" -eq 18 ]; then | |
| echo "Testing with npm run dev:node18" | |
| npm run dev:node18 -- --version | |
| else | |
| echo "Testing with npm run dev:compat" | |
| npm run dev:compat -- --version | |
| fi | |
| continue-on-error: true |