启用发布至 Open VSX 注册表 #70
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20.x" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run linter | |
| run: npm run lint | |
| - name: Compile | |
| run: npm run compile | |
| - name: Run tests (Linux) | |
| if: runner.os == 'Linux' | |
| run: xvfb-run -a npm test | |
| - name: Run tests (Windows/macOS) | |
| if: runner.os != 'Linux' | |
| run: npm test |